From c6f7295948b3eb04fcdc4dcd498666ca117a7de4 Mon Sep 17 00:00:00 2001 From: Syed Aman Raza <109358640+electro199@users.noreply.github.com> Date: Sun, 9 Oct 2022 14:09:40 +0500 Subject: [PATCH] refactor: headless --- video_creation/screenshot_downloader.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/video_creation/screenshot_downloader.py b/video_creation/screenshot_downloader.py index 2ba5f28..5e9bfb3 100644 --- a/video_creation/screenshot_downloader.py +++ b/video_creation/screenshot_downloader.py @@ -26,7 +26,7 @@ def download_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: in with sync_playwright() as p: print_substep("Launching Headless Browser...") - browser = p.chromium.launch(headless=True) # add headless=False for debug + browser = p.chromium.launch() # add headless=False for debug context = browser.new_context() @@ -69,7 +69,7 @@ def download_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: in postcontentpath = f"assets/temp/{id}/png/title.png" page.locator('[data-test-id="post-content"]').screenshot(path=postcontentpath) - if settings.config["settings"]["storymode"] == True: + if settings.config["settings"]["storymode"] : if settings.config["settings"]["storymodemethod"] == 0: try : #new change page.locator('[data-click-id="text"]').first.screenshot(