urllib behaves strangely

Gabriel Zachmann zach_RemoveMe at in.tu-clausthal.de
Tue Jun 13 04:58:46 EDT 2006


> headers = {}
> headers['User-Agent'] = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; 
> rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4'
> 
> request = urllib2.Request(url, headers)
> file = urllib2.urlopen(request)


ah, thanks a lot, that works !

Best regards,
Gabriel.

-- 
/-----------------------------------------------------------------------\
| If you know exactly what you will do --                               |
| why would you want to do it?                                          |
|                                                       (Picasso)       |
\-----------------------------------------------------------------------/



More information about the Python-list mailing list