I want to read the html source off a site but the site requires cookies. What code must I use to handle my cookies, instead of me typing them out? NB I want to use urllib2 to open the site, not urllib. I am currently using python 2.5
This is what I have done so far, but I do not want to type out all the cookies. import urllib2 data = urllib2.Request(url = "http://www.example.com", data = 'COOKIE:<xx;xx...>') htmlSource = urllib2.urlopen(data).read() Thanks in advance... __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor