Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

网页截图增加full_page配置项 #271

Open
wants to merge 2 commits into
base: Bot
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LittlePaimon/utils/brower.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ async def screenshot(
else:
card = page
if path:
img = await card.screenshot(path=path, timeout=timeout)
img = await card.screenshot(path=path, timeout=timeout, full_page=False)
else:
img = await card.screenshot(timeout=timeout)
img = await card.screenshot(timeout=timeout, full_page=False)
return MessageSegment.image(img)
except Exception as e:
logger.warning(f"Playwright 截图 url:{url} element:{element} 发生错误 {type(e)}:{e}")
Expand Down