|
|
@ -22,11 +22,14 @@ def download_screenshots_of_reddit_posts(reddit_object, screenshot_num, theme):
|
|
|
|
|
|
|
|
|
|
|
|
browser = p.chromium.launch()
|
|
|
|
browser = p.chromium.launch()
|
|
|
|
context = browser.new_context()
|
|
|
|
context = browser.new_context()
|
|
|
|
|
|
|
|
|
|
|
|
if theme.casefold() == "dark":
|
|
|
|
try:
|
|
|
|
cookie_file = open('video_creation/cookies.json')
|
|
|
|
if theme.casefold() == "dark":
|
|
|
|
cookies = json.load(cookie_file)
|
|
|
|
cookie_file = open('video_creation/cookies.json')
|
|
|
|
context.add_cookies(cookies)
|
|
|
|
cookies = json.load(cookie_file)
|
|
|
|
|
|
|
|
context.add_cookies(cookies)
|
|
|
|
|
|
|
|
except AttributeError:
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
# Get the thread screenshot
|
|
|
|
# Get the thread screenshot
|
|
|
|
page = context.new_page()
|
|
|
|
page = context.new_page()
|
|
|
|