def get_proxy try for proxy in proxies if proxy in bad_proxies continu

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def get_proxy():
try:
for proxy in proxies:
if proxy in bad_proxies:
continue
else:
return proxy
except:
print 'Ended proxies...'
sys.exit(0)