NewRedditUI

pull/1965/head
RqZen 2 years ago
parent 7bc1d2fa8f
commit e18695794b

@ -106,7 +106,7 @@ def get_subreddit_threads(POST_ID: str):
upvotes = submission.score
ratio = submission.upvote_ratio * 100
num_comments = submission.num_comments
threadurl = f"https://reddit.com{submission.permalink}"
threadurl = f"https://new.reddit.com/{submission.permalink}"
print_substep(f"Video will be: {submission.title} :thumbsup:", style="bold green")
print_substep(f"Thread url is: {threadurl} :thumbsup:", style="bold green")

@ -75,7 +75,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
print_substep("Launching Headless Browser...")
browser = p.chromium.launch(
headless=True
headless=False
) # headless=False will show the browser for debugging purposes
# 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
@ -220,7 +220,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
if page.locator('[data-testid="content-gate"]').is_visible():
page.locator('[data-testid="content-gate"] button').click()
page.goto(f'https://reddit.com{comment["comment_url"]}', timeout=0)
page.goto(f'https://new.reddit.com/{comment["comment_url"]}', timeout=0)
# translate code

Loading…
Cancel
Save