BUG URLLIB2

bart e_viola at libero.it
Fri Nov 15 14:31:37 EST 2002


> That's not a bug in urllib2; google.it is *really* returning 403
> FORBIDDEN.
> It appears that this google behaviour is triggered by the header
> 
> User-agent: Python-urllib/2.0a1
> 
> that urllib2 sends, which, in turn, suggests that Google explicitly bans
> urllib2.
> Complain to them.
> 
> Regards,
> Martin
> 

Thanks to all them that helped me swiftly!!!

How can I change User-Agent field presents inside "urllib2"?

I find two variables that (I think) define user agent in "urllib2" 
library: "__name__" and "__version__".

I tested to set them following way:

      __name__="Mozzilla"
      __version__="5.0"

but it failed yet!!!

Whatever suggest is accept!!!

                                                    - Ennio Viola -








More information about the Python-list mailing list