Skip to content

Instantly share code, notes, and snippets.

@gad0lin
Created April 21, 2015 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gad0lin/a3fb2338769ffd9a3238 to your computer and use it in GitHub Desktop.
Save gad0lin/a3fb2338769ffd9a3238 to your computer and use it in GitHub Desktop.
import pacparser
import urllib2
pac_url=""
response = urllib2.urlopen(pac_url)
f = open('proxy.pac', 'w')
f.write(response.read())
f.close()
pacparser.init()
pacparser.parse_pac("proxy.pac")
a=pacparser.find_proxy('http://www.google.com', 'www.google.com')
print(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment