Hi, I as a Python novice I throw myself at the mercy of experts in this forum. Could someone post a simple example of how to implement urllib2's proxy authentication. I've read all the references google returns as well as searched this site and cannot find an example that I can understand about how to do this.
I can do the simple proxy handler (below) as outlined on the Missing Manual but still get 407 errors because I don't know how to do the authentication part.

proxy_support = urllib2.ProxyHandler({})
opener = urllib2.build_opener(proxy_support)
urllib2.install_opener(opener)

I'd be massively grateful for any help - I can't imagine I am alone in trying to understand this.

Recommended Answers

All 2 Replies

Hi, thanks, but I have tried that and still get the following error

HTTPError: HTTP Error 407: Proxy Authentication Required
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.