|
|
@ -38,7 +38,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
|
|
|
|
with sync_playwright() as p:
|
|
|
|
with sync_playwright() as p:
|
|
|
|
print_substep("Launching Headless Browser...")
|
|
|
|
print_substep("Launching Headless Browser...")
|
|
|
|
|
|
|
|
|
|
|
|
browser = p.chromium.launch() # headless=False for debugging
|
|
|
|
browser = p.chromium.launch(headless=True) # headless=False will show the browser for debugging purposes
|
|
|
|
context = browser.new_context()
|
|
|
|
context = browser.new_context()
|
|
|
|
# Device scale factor (or dsf for short) allows us to increase the resolution of the screenshots
|
|
|
|
# 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
|
|
|
|
# When the dsf is 1, the width of the screenshot is 600 pixels
|
|
|
|