cast to string in __repr__
This commit is contained in:
		@@ -27,7 +27,7 @@ class ProxyElem():
 | 
			
		||||
            self.req["http"] = "socks5://" + proxy
 | 
			
		||||
            self.req["https"] = "socks5://" + proxy
 | 
			
		||||
    def __repr__(self):
 | 
			
		||||
        return self.proxy
 | 
			
		||||
        return str(self.proxy)
 | 
			
		||||
    
 | 
			
		||||
proxies = {}
 | 
			
		||||
for key in providers:
 | 
			
		||||
@@ -188,10 +188,11 @@ class MainHandler(tornado.web.RequestHandler):
 | 
			
		||||
                    current_list = proxy_list.copy()
 | 
			
		||||
                    current = proxy_list.pop()
 | 
			
		||||
                    proxy_list = [current] + proxy_list
 | 
			
		||||
                    print(current)
 | 
			
		||||
                    print(proxy_list)
 | 
			
		||||
                    try:
 | 
			
		||||
                        resp = requests.head(src, allow_redirects=True, proxies=current.req, timeout=2)
 | 
			
		||||
                        if resp is not None:
 | 
			
		||||
                            print(src)
 | 
			
		||||
                            src = resp.url
 | 
			
		||||
                    except Exception as e:
 | 
			
		||||
                        print(e)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user