From 1b85f34a0fced1d5bca239bccd44123e0f8fdadd Mon Sep 17 00:00:00 2001 From: yuyx <237899745@qq.com> Date: Wed, 14 Jan 2026 12:38:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=81=A2=E5=A4=8D=E6=88=AA=E5=9B=BE?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F=EF=BC=8C=E4=BF=9D=E6=8C=81=E5=AE=8C=E6=95=B4?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.5 --- services/screenshots.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/services/screenshots.py b/services/screenshots.py index 79b3996..8be6afb 100644 --- a/services/screenshots.py +++ b/services/screenshots.py @@ -311,14 +311,7 @@ def take_screenshot_for_account( screenshot_path = os.path.join(SCREENSHOTS_DIR, screenshot_filename) cookies_for_shot = cookie_path if is_cookie_jar_fresh(cookie_path) else None - # 优先直接截取目标页面(center.aspx?bz=X),避免 iframe 加载问题 if take_screenshot_wkhtmltoimage( - target_url, - screenshot_path, - cookies_path=cookies_for_shot, - proxy_server=proxy_server, - log_callback=custom_log, - ) or take_screenshot_wkhtmltoimage( index_url, screenshot_path, cookies_path=cookies_for_shot, @@ -326,6 +319,12 @@ def take_screenshot_for_account( run_script=run_script, window_status="ready", log_callback=custom_log, + ) or take_screenshot_wkhtmltoimage( + target_url, + screenshot_path, + cookies_path=cookies_for_shot, + proxy_server=proxy_server, + log_callback=custom_log, ): if os.path.exists(screenshot_path) and os.path.getsize(screenshot_path) > 1000: log_to_client(f"✓ 截图成功: {screenshot_filename}", user_id, account_id)