Akamai Control Panel Screenshot Using Ruby Engine - Cookie Problem

I am trying to escape some data from the Akamai control panel, but I am having trouble logging into the page using the mechanization for Ruby.

require 'rubygems' require 'mechanize' agent = Mechanize.new url = 'http://control.akamai.com' page = agent.get( url ) puts page.content 

When viewing the page, I found that:

 "Cookie support has been disabled in your browser. Please enable cookies before continuing." 

The fact that the page thinks I have disabled cookies prevents me from logging in. Any thoughts?

+4
source share
1 answer

You can specify another user agent:

 agent.user_agent_alias = 'Mac Safari' 

Or / And create a cookie manually:

 cookie = Mechanize::Cookie.new(key, value) cookie.domain = '.akamai.com' cookie.path = '/' agent.cookie_jar.add(cookie) 

Learn more about the Ruby Mechanize cookie on the following pages:

http://mechanize.rubyforge.org/Mechanize/Cookie.html http://mechanize.rubyforge.org/Mechanize/CookieJar.html

+6
source

All Articles