How to generate a list of currently active proxies in python

I have a python script where I am connecting to some sites through a proxy if the direct connection fails. What I want to do is get a list of active active proxies and I cannot figure out how to do this

I am creating a proxy through this:

 proxy = urllib2.ProxyHandler({'http': '127.0.0.1:8080'})
 opener = urllib2.build_opener(proxy)
 urllib2.install_opener(opener)
 urllib2.urlopen('http://www.google.com')

      

Please, help

+3


source to share





All Articles