Fix bug: screenshot was not taken because of a coordinate bug (#163)
This commit is contained in:
@@ -166,7 +166,7 @@ async def scrape_web_unsafe(
|
|||||||
await asyncio.sleep(5)
|
await asyncio.sleep(5)
|
||||||
|
|
||||||
screenshots: list[bytes] = []
|
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)
|
scroll_y_px = await scroll_to_top(page, drow_boxes=True)
|
||||||
# Checking max number of screenshots to prevent infinite loop
|
# 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
|
# We are checking the difference between the old and new scroll_y_px to determine if we have reached the end of the
|
||||||
|
|||||||
Reference in New Issue
Block a user