urllib.getproxies and PAC

G

gooli

Hi,

I'm using urllib to get html pages from the web but my computer is
behind a proxy.

The proxy is automatically configured in Internet Explorer via a
proxy.pac file (http://en.wikipedia.org/wiki/Proxy_auto-config).
From what I can see in the urllib source it only handles proxies that
are manually configured in IE and doesn't concern itself with
automatic configuration.

Does anybody know of some code that can handle all the proxy
configuration variants?

Thanks.
 
D

Duncan Booth

gooli said:
Hi,

I'm using urllib to get html pages from the web but my computer is
behind a proxy.

The proxy is automatically configured in Internet Explorer via a
proxy.pac file (http://en.wikipedia.org/wiki/Proxy_auto-config).

are manually configured in IE and doesn't concern itself with
automatic configuration.

Does anybody know of some code that can handle all the proxy
configuration variants?
Automatic proxy configuration involves retrieving a javascript file from a
server and calling the javascript for each URL to find out which proxy to
use. There really isn't any easy way to implement that in Python.

Your best bet may be to drive Internet Explorer through COM automation.
 

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,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top