Skip to content
This repository was archived by the owner on Jul 7, 2024. It is now read-only.

Commit d3991ef

Browse files
committed
Add variable for number of downloads
1 parent 8d78a45 commit d3991ef

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/reddit.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
CLIENT_ID = os.getenv("REDDIT_CLIENT_ID")
1414
SECRET_TOKEN = os.getenv("REDDIT_SECRET_TOKEN")
1515

16+
MEMES_TO_DOWNLOAD = 6
17+
1618

1719
class Reddit:
1820

@@ -52,7 +54,7 @@ def get_list_of_urls_and_titles_of_daily_top_memes(self, reddit_page: str, db_cl
5254
if not db_client.was_this_meme_already_downloaded(post['data']['url_overridden_by_dest']):
5355
list_of_memes.append((post['data']['url_overridden_by_dest'], post['data']['title']))
5456
number_of_posts += 1
55-
if number_of_posts > 5:
57+
if number_of_posts >= MEMES_TO_DOWNLOAD:
5658
break
5759

5860
return list_of_memes

0 commit comments

Comments
 (0)