From b16cdf6b94b7882ba89301ab53c46719597b1ac0 Mon Sep 17 00:00:00 2001 From: Nathaniel Phillips Date: Sat, 29 Jun 2024 19:36:53 -0500 Subject: [PATCH] Update screenshot_downloader.py --- video_creation/screenshot_downloader.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index f2e2ade..e7bcc48 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -182,7 +182,9 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): page.screenshot(clip=location, path=postcontentpath) else: page.wait_for_load_state('load') - page.locator('[data-test-id="post-content"]').screenshot(path=postcontentpath) + post_content_locator = page.locator('[data-test-id="post-content"]') + post_content_locator.wait_for(timeout=60000) + post_content_locator.screenshot(path=postcontentpath) except Exception as e: print_substep("Something went wrong!", style="red") resp = input(