diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 507fb51..6b56e99 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -74,7 +74,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): print_substep("Launching Headless Browser...") browser = p.chromium.launch( - headless=False + headless=True ) # headless=False will show the browser for debugging purposes # Device scale factor (or dsf for short) allows us to increase the resolution of the screenshots # When the dsf is 1, the width of the screenshot is 600 pixels @@ -86,6 +86,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int): color_scheme="dark", viewport=ViewportSize(width=W, height=H), device_scale_factor=dsf, + user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", ) cookies = json.load(cookie_file) cookie_file.close()