How to configure proxy authentication when using urllib2?

L

Licheng Fang

I use a HTTP proxy to connect to Internet. When I run ulropen command I
get HTTP Error 407: Proxy authorization required. Could anybody tell me
how to resolve this? Thanks!
 
J

Jarek Zgoda

Licheng Fang napisa³(a):
I use a HTTP proxy to connect to Internet. When I run ulropen command I
get HTTP Error 407: Proxy authorization required. Could anybody tell me
how to resolve this? Thanks!

You can build and install opener instance, then all urllib2 calls will
use it.

Some information:
http://www.voidspace.org.uk/python/articles/urllib2.shtml#proxies, one
of many cookbook recipes:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456195.
Generally, there's much more to google on this topic.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,054
Latest member
LucyCarper

Latest Threads

Top