From a7aae4c4c9af2bd3d816f86bec705100dee3f521 Mon Sep 17 00:00:00 2001 From: bvwl <2201101122@qq.com> Date: Fri, 28 Nov 2025 16:05:11 +0800 Subject: [PATCH] 0.2.0 --- spider/main.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/spider/main.py b/spider/main.py index d40aab7..a173fc3 100644 --- a/spider/main.py +++ b/spider/main.py @@ -788,6 +788,18 @@ def main(): pass cleanup_all_browsers() break + for f, proxy in list(futures_map.items()): + if f.done() and not stop_event.is_set() and not restart_event.is_set(): + try: + _ = f.exception() + except Exception: + pass + try: + new_future = executor.submit(proxy_loop, proxy, stop_event) + del futures_map[f] + futures_map[new_future] = proxy + except Exception as e: + logger.error(f"重启代理线程失败: {proxy} - {e}") time.sleep(0.2) try: