From 8ed1d9d403bce83a0c3ed969b6939c2852a06f44 Mon Sep 17 00:00:00 2001 From: Franklin-F Date: Wed, 28 May 2025 22:46:01 +0800 Subject: [PATCH] fix: disable SSL certificate warnings and update proxy fetching method to use fetch_proxies1 --- main.py | 2 ++ multi_proxy_refill.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index f80664c..f4b8901 100644 --- a/main.py +++ b/main.py @@ -16,6 +16,8 @@ from threading import Lock from concurrent.futures import ThreadPoolExecutor, as_completed from logger import logger import os +import urllib3 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) BASE_DIR = os.path.dirname(os.path.abspath(__file__)) # 构造证书文件绝对路径 diff --git a/multi_proxy_refill.py b/multi_proxy_refill.py index 83f905f..91e4fed 100644 --- a/multi_proxy_refill.py +++ b/multi_proxy_refill.py @@ -170,7 +170,7 @@ def refill_queue(r: redis.Redis, region_name: str, region_code: str, to_fetch = batch - length print(f"[{time.strftime('%H:%M:%S')}] {key} 长度 {length} < {low},一次性拉取 {to_fetch} 条…") - proxies = fetch_proxies2(region_code, to_fetch) + proxies = fetch_proxies1(region_code, to_fetch) if proxies: r.rpush(key, *proxies) print(f"[{time.strftime('%H:%M:%S')}] 已入队 {len(proxies)} 条 → 新长度 {r.llen(key)}")