import urllib2 file open proxy_list txt rt proxy_list file readlines c

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
import urllib2
file=open("proxy_list.txt","rt")
proxy_list=file.readlines()
count=0
for i in proxy_list:
try:
proxy_handler=urllib2.ProxyHandler({'http':i}) #200.166.141.219:3128
opener=urllib2.build_opener(proxy_handler)
opener.open("http://ruda.1plus1.ua/?current=12321&vote_section='day'&vote_contestant=1227304800&final=true") #javascript:doVote(12321,'day',1227304800,true);
print (" %s ok \n " % count )
except:
pass
count+=1
print count