From 9e917f35be29f1cf6c15e9c273f44b4b6074ee25 Mon Sep 17 00:00:00 2001 From: "steve.gao" Date: Tue, 10 Dec 2024 15:25:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=83=A8=E5=88=86=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E7=BB=84=E5=BB=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kuaishou/ks_http.py | 3 +-- utils/tool.py | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/kuaishou/ks_http.py b/kuaishou/ks_http.py index 4d5141c..3af714a 100644 --- a/kuaishou/ks_http.py +++ b/kuaishou/ks_http.py @@ -133,8 +133,7 @@ def download_q(url, headers, cookies, data=None, is_proxy=False, timeout=10): :param timeout: :return: """ - proxy_list = [f"172.24.12.23:{random.randint(45001, 45250)}", f"172.18.128.225:{random.randint(45001, 45250)}", - "16HFBVJC:897944@u270.40.tp.16yun.cn:6448"] + proxy_list = [] # TODO: 代理 # proxy = f"{random.choice(proxy_list)}:{random.randint(45001, 45250)}" # 修改代理 proxy = random.choice(proxy_list) proxies = {'http': proxy, 'https': proxy} # 代理初始化 diff --git a/utils/tool.py b/utils/tool.py index f5e6c42..414e60b 100644 --- a/utils/tool.py +++ b/utils/tool.py @@ -93,8 +93,7 @@ def download_q(url, headers, cookies, data=None, is_proxy=False, timeout=10): :return: """ - proxy = "16ABDDQU:153219@u1590.20.tp.16yun.cn:6447" - proxy = f"172.24.12.23:{random.randint(45001, 45100)}" # 修改代理 + proxy = f"" # TOdO: 修改代理 proxies = {'http': proxy, 'https': proxy} # 代理初始化 try: @@ -117,7 +116,7 @@ def download_q(url, headers, cookies, data=None, is_proxy=False, timeout=10): return status, response -async def upload_file(file_path, content, url="http://172.18.1.113:8080/upload"): +async def upload_file(file_path, content, url=""): # TODO:go-fast """ 异步上传 :param file_path: