refactor: headless
This commit is contained in:
1 parent
3f6344aca3
commit
c6f7295948
1 file changed
+2
-2
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user