Hi everyone,

Could anyone tell me why FancyURLopener was replaced by this?

MyURLopener = urllib2.build_opener(U2RedirectHandler)
MyURLopener.add_handler(proxyHandler)
MyURLopener.add_handler(proxyAuthHandler)
MyURLopener.add_handler(authhandler)
MyURLopener.addheaders = [('User-agent', useragent)]

>From http://docs.python.org/library/urllib.html#urllib.FancyURLopener :
FancyURLopener subclasses URLopener providing default handling for the 
following HTTP response codes: 301, 302, 303, 307 and 401. For the 30x 
response codes listed above, the Location header is used to fetch the 
actual URL. For 401 response codes (authentication required), basic HTTP 
authentication is performed. For the 30x response codes, recursion is 
bounded by the value of the maxtries attribute, which defaults to 10.

Maarten


_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to