Fix bug: screenshot was not taken because of a coordinate bug (#163)

This commit is contained in:
Shuchang Zheng 2024-04-07 14:19:45 +08:00 committed by GitHub
parent 242a87bb24
commit 112b44e41a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -166,7 +166,7 @@ async def scrape_web_unsafe(
await asyncio.sleep(5)
screenshots: list[bytes] = []
scroll_y_px_old = -1.0
scroll_y_px_old = -30.0
scroll_y_px = await scroll_to_top(page, drow_boxes=True)
# Checking max number of screenshots to prevent infinite loop
# We are checking the difference between the old and new scroll_y_px to determine if we have reached the end of the