I'm using mechanize to login into a website and then retrieve a page. I'm running into some problems and I suspect this is due to some values in the cookies. When Mechanize logs into a website I assume it stores the cookies.
How do I print out all the data stored in the cookies by Mechanize?
The agent has a cookies methods.
agent = Mechanize.new
page = agent.get("http://www.google.com/")
agent.cookies
agent.cookies.to_s
The cookies return is a Mechanize::Cookies object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With