Skip to content

Commit

Permalink
Move refresh rate to variable
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanLua authored Jul 2, 2024
1 parent ba35da5 commit c10ee97
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/instagram_to_discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
INSTAGRAM_PROFILE = input("Enter the Instagram account you want monitor: ")
WEBHOOK_URL = input("Enter the Discord webhook URL: ")

refresh_interval = 600 # How often to check for new posts (in seconds)

# Get instance
L = instaloader.Instaloader()

Expand All @@ -34,6 +36,6 @@ def check_for_new_posts():
break # Only check the most recent post

# Every 10 minutes
while True:
while __name__ == "__main__":
check_for_new_posts()
time.sleep(600) # Sleep for 600 seconds (10 minutes)
time.sleep(refresh_interval) # Sleep for 600 seconds (10 minutes)

0 comments on commit c10ee97

Please sign in to comment.