Browse Source

fix: avoid error on "ip:port:port" format (#207)

Cesaryuan 1 year ago
parent
commit
0033586867
1 changed files with 1 additions and 1 deletions
  1. 1 1
      proxypool/utils/proxy.py

+ 1 - 1
proxypool/utils/proxy.py

@@ -56,7 +56,7 @@ def convert_proxy_or_proxies(data):
             if is_auth_proxy(item):
                 host, port = extract_auth_proxy(item)
             else:
-                host, port = item.split(':')
+                host, port, *_ = item.split(':')
             result.append(Proxy(host=host, port=int(port)))
         return result
     if isinstance(data, str) and is_valid_proxy(data):