Re: Sending cookies with python. When download with python

2007-06-05 Thread Matimus
On Jun 5, 9:14 am, [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. Yes. I haven't done it but I know you shou

Re: Sending cookies with python. When download with python

2007-06-05 Thread Yongjian Xu
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(ur