diff --git a/multi_proxy_refill.py b/multi_proxy_refill.py index c038e02..f6a2ea9 100644 --- a/multi_proxy_refill.py +++ b/multi_proxy_refill.py @@ -42,10 +42,13 @@ def fetch_proxies(region_code, n): 从第三方一次性请求 n 条代理,返回格式化列表 """ params = { - "auth": "ip", + "auth": "pwd", + "format": "1", "n": n, "p": "http", + "gate": "global", "g": region_code, + "r": "0", "type": "json", "sign": SIGN, "accessid": ACCESS_ID, @@ -66,12 +69,12 @@ def fetch_proxies(region_code, n): result = [] for item in arr: - # user = quote(item["username"], safe="") - # pwd = quote(item["password"], safe="") + user = quote(item["username"], safe="") + pwd = quote(item["password"], safe="") ip = item["ip"] port = item["port"] - # result.append(f"http://{user}:{pwd}@{ip}:{port}") - result.append(f"http://{ip}:{port}") + result.append(f"http://{user}:{pwd}@{ip}:{port}") + # result.append(f"http://{ip}:{port}") return result