Merge branch 'develop' into master

pull/280/head
James Aaron Erang 3 years ago committed by GitHub
commit 8e720d4e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,5 +16,14 @@ THEME=""
# Enter a subreddit, e.g. "AskReddit"
SUBREDDIT=""
# Filters the comments by range of lenght (min and max characters)
# Min has to be less or equal to max
# DO NOT INSERT ANY SPACES BETWEEN THE COMMA AND THE VALUES
COMMENT_LENGTH_RANGE = "min,max"
# Range is 0 -> 1
OPACITY="0.9"
# The absolute path of the folder where you want to save the final video
# If empty or wrong, the path will be 'assets/'
FINAL_VIDEO_PATH=""

@ -114,7 +114,7 @@ def get_subreddit_threads(subreddit_, thread_link_, number_of_comments):
comment_count = 0
for top_level_comment in submission.comments:
if number_of_comments is not None:
if comment_count > number_of_comments:
if comment_count == number_of_comments:
break
if not top_level_comment.stickied:
@ -125,6 +125,7 @@ def get_subreddit_threads(subreddit_, thread_link_, number_of_comments):
"comment_id": top_level_comment.id,
}
)
count += 1
except AttributeError:
pass

@ -38,9 +38,9 @@ def download_screenshots_of_reddit_posts(reddit_object, screenshot_num, theme):
page.set_viewport_size(ViewportSize(width=1920, height=1080))
if page.locator('[data-testid="content-gate"]').is_visible():
# This means the post is NSFW and requires to click the proceed button.
print_substep("Post is NSFW. You are spicy...")
page.locator('[data-testid="content-gate"] button').click()
page.locator('[data-click-id="text"] button').click() # Remove "Click to see nsfw" Button in Screenshot
page.locator('[data-test-id="post-content"]').screenshot(path="assets/png/title.png")

Loading…
Cancel
Save