Commit afeb946d authored by Joakim Nylén's avatar Joakim Nylén


parent 1f56c1aa
......@@ -4,6 +4,7 @@ require 'pathname'
require 'fileutils'
require 'nokogiri'
require 'dotenv'
require 'logger'
# Load dotenv
......@@ -11,9 +12,12 @@ Dotenv.load
a = { |agent|
# Sky refreshes after login
agent.follow_meta_refresh = true
agent.user_agent_alias = (Mechanize::AGENT_ALIASES.keys - ['Mechanize']).sample
agent.user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.91 Safari/537.36"
a.log = $stderr
a.agent.http.debug_output = $stderr
puts "Fetching login page..."
a.get('') do |home_page|
puts "Logging in.."
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment