yes. urllib2 has Request class that compose html headers (dict object) into a request object where you can put Cookie: header into it. Also, there are a few Cookie related modules you can use too.
An example using urllib2 can be something like this: def myrequest(url): req = urllib2.Request(url) headers = {'Cookie':'cookies','some_other_headers':'contents'} for k,v in headers.iteritems(): req.add_header(k,v) return req Hope it helps. Jim On 6/5/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
I need to download files off a password protected website. So if I try to download files off the site with python I will be blocked. Is there anyway to send cookies with python. So I will be authenticated. -- http://mail.python.org/mailman/listinfo/python-list
-- Yongjian (Jim) Xu =========== Sysops
-- http://mail.python.org/mailman/listinfo/python-list