From a159ea31ccb4bd0dba056dcc8f5801fbfe05958e Mon Sep 17 00:00:00 2001 From: ddrwode <34234@3来 34> Date: Fri, 27 Feb 2026 18:34:17 +0800 Subject: [PATCH] haha --- api_yunyiyunpan.py | 3 +++ 云翼云盘.py | 18 +++++++++--------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/api_yunyiyunpan.py b/api_yunyiyunpan.py index 6cfdf3c..7665358 100644 --- a/api_yunyiyunpan.py +++ b/api_yunyiyunpan.py @@ -102,6 +102,9 @@ def _create_browser_with_proxy(proxy_host: str, proxy_port: int, user_agent: str "os": "Android", "platformVersion": 12, "userAgent": user_agent, + "blockLargeImages": True, + "maxImageKB": 0, + "startupParams": "--blink-settings=imagesEnabled=false", } create_data = client.create_browser( browser_name=f"yunyiyunpan_{uuid.uuid4().hex[:8]}", diff --git a/云翼云盘.py b/云翼云盘.py index 7cda813..30e6b9a 100644 --- a/云翼云盘.py +++ b/云翼云盘.py @@ -687,7 +687,7 @@ def submit_phone( url: str = "http://yscnb.com/tyyp/", alpha_threshold: int = 12, distance_adjust: int = 0, - wait_page: float = 0.3, + wait_page: float = 0.12, ) -> Any: """ 填写手机号、点击获取验证码、执行滑块,返回 getYanZhenMa/v2 接口响应体。 @@ -708,7 +708,7 @@ def submit_phone( ) if agree_checkbox: click_safe(agree_checkbox) - time.sleep(0.4) + time.sleep(0.1) # 2. 立即订购 order_btn = None @@ -733,16 +733,16 @@ def submit_phone( ) if order_btn: break - time.sleep(0.25) + time.sleep(0.08) if order_btn: try: order_btn.run_js("this.scrollIntoView({block:'center'})") - time.sleep(0.05) + time.sleep(0.02) except Exception: pass click_safe(order_btn) - time.sleep(0.4) + time.sleep(0.1) else: try: page.run_js(""" @@ -759,7 +759,7 @@ def submit_phone( """) except Exception: pass - time.sleep(0.4) + time.sleep(0.1) # 3. 输入手机号 phone_input = find_first( @@ -909,7 +909,7 @@ def submit_phone( last_move_distances = move_distances drag_slider(page, slider, move_distance) - time.sleep(0.2) + time.sleep(0.1) remaining = max(0.1, deadline - time.time()) packet, toast_text = _wait_packet_or_feedback(page, timeout=min(4.0, remaining)) @@ -1055,11 +1055,11 @@ def main() -> None: def input_code(page, code): """填写验证码并点击确认,监听 hn_userEquitys/common/order 并返回抓包内容。""" page.ele('x://input[@placeholder="请输入验证码"]').input(code, clear=True) - time.sleep(0.5) + time.sleep(0.12) page.listen.start("hn_userEquitys/common/order") page.ele('x://*[@id="app"]/div/img').click(by_js=True) - time.sleep(0.5) + time.sleep(0.12) page.ele('x://*[@id="app"]/div/div[7]/div/div[3]/button[2]').click(by_js=True) res = page.listen.wait() body = getattr(getattr(res, "response", None), "body", None)