开发者

How do I capture and then pass cookies to Ruby/Mechanize ( a workaround to log in)?

开发者 https://www.devze.com 2022-12-18 08:33 出处:网络
This question is linked with my other question \"log in with browser and then ruby/mechanize takes it over?\"

This question is linked with my other question "log in with browser and then ruby/mechanize takes it over?"

I am not able to log into one website using Ruby/Mechanize so I was thinking if there is any workaround for the log-in part. After that I want my script to take over and do its job.

Could 开发者_如何转开发somebody suggest what is the best/easiest way to:

  • capture all info (cookies and do I need anything else)?
  • pass it to Ruby/Mechanize?


I do not know how to pass cookies and headers to Mechanize. I do not need this workaround any more but I can recommend these Firefox addons for analyzing/saving/viewing cookies and HTTP headers. They helped me to find a solution:

  • Live HTTP headers
  • Firebug
  • httpfox
  • webdeveloper
0

精彩评论

暂无评论...
验证码 换一张
取 消