From: Aaron Patterson Date: 2007-07-23T07:45:00+09:00 Subject: Re: mechanize to access https links On Mon, Jul 23, 2007 at 12:25:02AM +0900, anne001 wrote: > require 'rubygems' > require 'mechanize' > > mech = WWW::Mechanize.new > page = > mech.get('https://tutorials.siteofinterest.com/? > page=tutorialView&tId=47') > > This code does return a page, but not the page I wanted. So there must > be something missing, a cookie or something which indicates I have > logged in. > > If I try to access one of the links in ruby > mech.get('http://tutorials.siteofinterest.com/tutorials/Intro/Intface/ > Intface.html') > I get an error, please provide username and password > while if I paste the http address in safari, it opens the tutorial > page. How do I find out what the browser is doing to satisfy the > tutorial web page server? Make sure to clear all your cookies before you do that. I recommend getting Firefox, clearing your cookies, and using LiveHTTPHeaders. http://livehttpheaders.mozdev.org/ Hope that helps. -- Aaron Patterson http://tenderlovemaking.com/