urlretrieve can't send headers

Diez B. Roggisch deets at nospam.web.de
Sat Apr 19 18:38:10 CEST 2008


triplezone3 schrieb:
> Hello. I'm using urllib.urlretrieve to download files,
> because it provides a handy hook function.
> Unfortunately, it won't let me send headers, which
> could be quite useful. Is there any way I could do
> this?

I suggest you look into urllib2. It allows you to explicitly create an 
request-object that you can stuff with headers and parameters and what 
you like.

diez



More information about the Python-list mailing list