浏览代码

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

Cesaryuan 1 年之前
父节点
当前提交
0033586867
共有 1 个文件被更改,包括 1 次插入1 次删除
  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):