Skip to content

Commit

Permalink
Fix refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua authored Jul 4, 2024
1 parent 3fa225f commit 1d1ff12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/instagram_to_discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def check_for_new_posts():
posts = profile.get_posts()

until = datetime.now()
since = until.replace(hour=until.second-REFRESH_INTERVAL) # Check for posts in the last hour
since = until.replace(second=until.second-REFRESH_INTERVAL)

for post in takewhile(lambda p: p.date > until, dropwhile(lambda p: p.date > since, posts)):
instagram_post_url = "https://instagram.com/p/" + post.shortcode + "/"
Expand Down

0 comments on commit 1d1ff12

Please sign in to comment.