From b30a1f0844bdc59f0010b075f35e365eac43c915 Mon Sep 17 00:00:00 2001 From: work Date: Fri, 22 Aug 2025 15:17:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8D=A2=E6=88=90sock5=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- const.py | 2 +- spider/task.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/const.py b/const.py index cc1b19a..889d202 100644 --- a/const.py +++ b/const.py @@ -22,7 +22,7 @@ SECRET_KEY = 'iPXte32y1deoySiDq0RwONUJIiIgvjTVhbfCL8tV' BUCKET = 'facebook' # PROXY -PROXY_HOST = 'http://api.proxy.ip2world.com/getProxyIp?num=1®ions=us&lb=1&return_type=json&protocol=http' +PROXY_HOST = 'http://api.proxy.ip2world.com/getProxyIp?num=1®ions=us&lb=1&return_type=json&protocol=sock5' api_key = "adf0d1fc9c9313b7f87c18bf9caef01d" diff --git a/spider/task.py b/spider/task.py index 427c739..2766efd 100644 --- a/spider/task.py +++ b/spider/task.py @@ -775,7 +775,7 @@ def get_proxy_from_api(): proxy_port = proxy_datum['port'] if proxy_ip and proxy_port: - return f"http://{proxy_ip}:{proxy_port}" + return f"socks5://{proxy_ip}:{proxy_port}" raise OperationFailed("获取代理时出错") except Exception as e: