diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index ecff2f4..636a833 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -230,6 +230,8 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): zoom = settings.config["settings"]["zoom"] # zoom the body of the page page.evaluate("document.body.style.zoom="+str(zoom)) + # scroll comment into view + page.locator(f"#t1_{comment['comment_id']}").scroll_into_view_if_needed() # as zooming the body doesn't change the properties of the divs, we need to adjust for the zoom location = page.locator(f"#t1_{comment['comment_id']}").bounding_box() for i in location: