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
python proxy


source to share


No one has answered this question yet

Check out similar questions:

5116
How can I check if a file exists without exceptions?
3790
How can I safely create a subdirectory?
3474
How to list all files in a directory?
3235
How to check if a list is empty?
3119
What is the difference between Python list methods that are appended and expanded?
2849
How to make a flat list from a list of lists?
2818
Finding the index of an element by specifying the list that contains it in Python
2568
How to find the current time in Python
2047
How do I concatenate two lists in Python?
1782
How can I get the number of items in a list?



All Articles
Loading...
X
Show
Funny
Dev
Pics