diff --git a/stream.py b/stream.py index 8f8d30a..a97a019 100755 --- a/stream.py +++ b/stream.py @@ -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)