From 47fe57ef49ed67b39b5337ec6ec8e9a3563eaaef Mon Sep 17 00:00:00 2001 From: bvwl <2201101122@qq.com> Date: Tue, 25 Nov 2025 00:50:09 +0800 Subject: [PATCH] 0.1.5 --- README.md | 2 ++ spider/mail_.py | 4 ---- spider/main.py | 20 ++++++++++++++++---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4395921..b02b54c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# 0.1.5 +- 新增status字段 # 0.1.4 - 修复自动化bug # 0.1.3 diff --git a/spider/mail_.py b/spider/mail_.py index db8713c..b8de530 100644 --- a/spider/mail_.py +++ b/spider/mail_.py @@ -111,9 +111,7 @@ class DomainManager: "emaing.pw", "emaing.xyz", "qydkjgs.asia", - "qydgs.autos", "qydkj.homes", - "qydkjgs.baby", "qydkj.baby", "qydkj.cyou", "qydkjgs.autos", @@ -122,9 +120,7 @@ class DomainManager: "qydkjgs.homes", "qydgs.asia", "qydkj.asia", - "qydgs.baby", "qydgs.cyou", - "qydgs.homes", "lulanjing.asia", "lisihan.asia", "mmwan.asia", diff --git a/spider/main.py b/spider/main.py index 911a9ef..1583dfa 100644 --- a/spider/main.py +++ b/spider/main.py @@ -437,7 +437,7 @@ class Auto: 't:input@id=PrintName').set.value(last_name+' '+first_name) self.tab.wait(0.1) return self.submit_file(first_name, last_name, birthday, current_address, city, phone, postal_code, province, email, text) - + except Exception as e: logger.error(f"填写问卷失败: {e}") @@ -452,6 +452,15 @@ class Auto: 't:h2@text()=CLAIM SUBMISSION CONFIRMATION', timeout=3) if res: logger.info("提交问卷成功") + res = self.tab.ele('@text():Your claim number: ') + if res: + logger.info(f"反馈地址: {res.text()}") + text =f"{text}----{res.text()}" + status = True + + else: + status=False + api.create_info( first_name=first_name, last_name=last_name, @@ -462,10 +471,11 @@ class Auto: postal_code=postal_code, province=province, email=email, - text=text + text=text, + status=status ) return True - + bol = self.tab.ele( 't:div@text():ERR_SSL_PROTOCOL_ERROR', timeout=1) if bol: @@ -524,6 +534,7 @@ def get_random_proxy() -> list[str] | None: except Exception: return None + def get_all_proxies() -> list[list[str]]: """ 返回固定代理列表(与提供的代理一一对应) @@ -752,7 +763,8 @@ def run_all_proxies_concurrently(): return threads = [] for i, proxy in enumerate(proxies): - t = threading.Thread(target=run_proxies_forever, args=(proxy,), name=f"proxy-thread-{i}") + t = threading.Thread(target=run_proxies_forever, + args=(proxy,), name=f"proxy-thread-{i}") t.start() threads.append(t) logger.info(f"固定代理线程 {i} 已启动: {proxy[0]}:{proxy[1]} @ {proxy[2]}")