fix: 修复截图只能截取区域的问题,改为截取整个网页内容
将 full_page=False 改为 full_page=True,使截图能够捕获完整的网页内容而不仅仅是可见区域。 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -111,7 +111,7 @@ def take_screenshot(config):
|
|||||||
|
|
||||||
# 截图
|
# 截图
|
||||||
print(f"[截图进程] 截图保存到: {screenshot_path}", flush=True)
|
print(f"[截图进程] 截图保存到: {screenshot_path}", flush=True)
|
||||||
page.screenshot(path=screenshot_path, full_page=False, type='jpeg', quality=85)
|
page.screenshot(path=screenshot_path, full_page=True, type='jpeg', quality=85)
|
||||||
|
|
||||||
# 验证截图文件
|
# 验证截图文件
|
||||||
if os.path.exists(screenshot_path) and os.path.getsize(screenshot_path) > 1000:
|
if os.path.exists(screenshot_path) and os.path.getsize(screenshot_path) > 1000:
|
||||||
|
|||||||
Reference in New Issue
Block a user