Merge conflict fix

pull/1986/head
cyteon 1 year ago
commit bc0abb6136

@ -43,8 +43,12 @@ class StreamlabsPolly:
f"Please set the config variable STREAMLABS_POLLY_VOICE to a valid voice. options are: {voices}" f"Please set the config variable STREAMLABS_POLLY_VOICE to a valid voice. options are: {voices}"
) )
voice = str(settings.config["settings"]["tts"]["streamlabs_polly_voice"]).capitalize() voice = str(settings.config["settings"]["tts"]["streamlabs_polly_voice"]).capitalize()
headers = {"referer": "https://streamlabs.com"}
body = {"voice": voice, "text": text, "service": "polly"} body = {"voice": voice, "text": text, "service": "polly"}
<<<<<<< HEAD
headers = {"Referer": "https://streamlabs.com/"} headers = {"Referer": "https://streamlabs.com/"}
=======
>>>>>>> elebumm-master
response = requests.post(self.url, headers=headers, data=body) response = requests.post(self.url, headers=headers, data=body)
if not check_ratelimit(response): if not check_ratelimit(response):
self.run(text, filepath, random_voice) self.run(text, filepath, random_voice)

@ -104,7 +104,7 @@ def get_subreddit_threads(POST_ID: str):
upvotes = submission.score upvotes = submission.score
ratio = submission.upvote_ratio * 100 ratio = submission.upvote_ratio * 100
num_comments = submission.num_comments 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"Video will be: {submission.title} :thumbsup:", style="bold green")
print_substep(f"Thread url is: {threadurl} :thumbsup:", style="bold green") print_substep(f"Thread url is: {threadurl} :thumbsup:", style="bold green")

@ -73,7 +73,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
print_substep("Launching Headless Browser...") print_substep("Launching Headless Browser...")
browser = p.chromium.launch( browser = p.chromium.launch(
headless=True headless=False
) # headless=False will show the browser for debugging purposes ) # 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 # 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
@ -98,9 +98,9 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
page.set_viewport_size(ViewportSize(width=1920, height=1080)) page.set_viewport_size(ViewportSize(width=1920, height=1080))
page.wait_for_load_state() page.wait_for_load_state()
page.locator('[name="username"]').fill(settings.config["reddit"]["creds"]["username"]) page.locator(f'input[name="username"]').fill(settings.config["reddit"]["creds"]["username"])
page.locator('[name="password"]').fill(settings.config["reddit"]["creds"]["password"]) page.locator(f'input[name="password"]').fill(settings.config["reddit"]["creds"]["password"])
page.locator("button[class$='m-full-width']").click() page.get_by_role("button", name="Log In").click()
page.wait_for_timeout(5000) page.wait_for_timeout(5000)
login_error_div = page.locator(".AnimatedForm__errorMessage").first login_error_div = page.locator(".AnimatedForm__errorMessage").first
@ -218,7 +218,7 @@ def get_screenshots_of_reddit_posts(reddit_object: dict, screenshot_num: int):
if page.locator('[data-testid="content-gate"]').is_visible(): if page.locator('[data-testid="content-gate"]').is_visible():
page.locator('[data-testid="content-gate"] button').click() 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']}")
# translate code # translate code

Loading…
Cancel
Save