fixed dark mode bug

pull/171/head
reoccurcat 3 years ago
parent d746fabb6b
commit 77f68b847c

@ -23,10 +23,13 @@ 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()
try:
if theme.casefold() == "dark": if theme.casefold() == "dark":
cookie_file = open('video_creation/cookies.json') cookie_file = open('video_creation/cookies.json')
cookies = json.load(cookie_file) cookies = json.load(cookie_file)
context.add_cookies(cookies) context.add_cookies(cookies)
except AttributeError:
pass
# Get the thread screenshot # Get the thread screenshot
page = context.new_page() page = context.new_page()

Loading…
Cancel
Save