diff --git a/script.py b/script.py index a1b241f..8506c73 100644 --- a/script.py +++ b/script.py @@ -1,5 +1,6 @@ """Main script to toot a new post""" +import time from os import getenv, remove from os.path import getsize @@ -71,6 +72,7 @@ for submission in reddit.subreddit(str(getenv("REDDIT_SUBREDDIT"))).top(time_fil mastodon.status_post(status_text, visibility="unlisted") else: media = mastodon.media_post(filename) + time.sleep(60.0) status_text = submission.title + "\n\ngeposted von u/" + submission.author.name + "\nhttps://www.reddit.com" + submission.permalink mastodon.status_post(status_text, media_ids=media["id"], visibility="unlisted")