A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/103569.html below:

Using urlopen with a proxy server requiring authentication

Using urlopen with a proxy server requiring authentication Using urlopen with a proxy server requiring authenticationMoshe Zadka moshez at zadka.site.co.il
Mon Apr 2 13:35:24 EDT 2001
On 2 Apr 2001 16:01:29 GMT, dick.streefland at tasking.com (Dick Streefland) wrote:
 
> For a proxy authorization, you need to send an additional
> "Proxy-authorization" header with the base64 "encryption" of your
> username and password. I don't think you can do that with urllib,
> but you can use the httplib module instead:
> 
>   import binascii
>   cookie = binascii.b2a_base64("username:password")
>   ...
>   h.putheader('Proxy-authorization', 'Basic %s' % cookie)

Or use 2.1's urllib2 which support Proxy authentication easily and
transparently.
-- 
"I'll be ex-DPL soon anyway so I'm        |LUKE: Is Perl better than Python?
looking for someplace else to grab power."|YODA: No...no... no. Quicker,
   -- Wichert Akkerman (on debian-private)|      easier, more seductive.
For public key, finger moshez at debian.org  |http://www.{python,debian,gnu}.org


More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4