Fastest Proxy Iteration in Python
问题 Let's say I have a list that contains 10,000+ proxies proxy_list = ['ip:port','ip:port',.....10,000+ items] How do I iterate it to get the proxies that works for my pc? Using the following code it is possible to find it , but takes 5*10,000 seconds to get completed. How would I iterate through the list faster? import requests result=[] for I in proxy_list: try: requests.get('http:\\www.httpbin.org\ip',proxies = {'https' : I, 'http' : I } ,timeout = 5) result.append(I) except: pass 回答1: You