Proxy authentication required

Chris Rebert clp2 at rebertia.com
Tue Mar 22 20:18:16 EDT 2011


On Tue, Mar 22, 2011 at 3:57 AM, gervaz <gervaz at gmail.com> wrote:
> On 22 Mar, 09:34, gervaz <ger... at gmail.com> wrote:
>> On 22 Mar, 00:02, Chris Rebert <c... at rebertia.com> wrote:
>> > On Mon, Mar 21, 2011 at 2:38 AM, gervaz <ger... at gmail.com> wrote:
>> > > Hi all,
>> > > I've got to download some web pages but I'm behind a proxy. So far
>> > > this is what I've used without any successful result receiving the
>> > > error: "urllib.error.HTTPError: HTTP Error 407: Proxy Authentication
>> > > Required ( The ISA Server requires auth
>> > > orization to fulfill the request. Access to the Web Proxy filter is
>> > > denied.  )":
>>
>> > > hc = urllib.request.HTTPCookieProcessor()
>> > > hp = urllib.request.ProxyHandler({"http": "10.242.38.251:80",
>> > > "username": "domain\username", "password": "password"})
<snip>
> Further investigating the issue the proxy needs NTLM authentication,
> for that reason no solution so far works. I'm using py3.

pycurl apparently supports NTLM proxies, but it's not Python 3-compatible:
http://pycurl.sourceforge.net/

python-ntlm seems to be Python 3-compatible, but I don't know whether
it handles proxying:
http://code.google.com/p/python-ntlm/

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list