From 8e68462644cf25bd69154c44c78cfdfb9cddcd00 Mon Sep 17 00:00:00 2001 From: Oloturia Date: Tue, 29 Nov 2022 15:57:07 +0100 Subject: [PATCH] renamed replier --- mastodon_replier.py => mastrep.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) rename mastodon_replier.py => mastrep.py (93%) diff --git a/mastodon_replier.py b/mastrep.py similarity index 93% rename from mastodon_replier.py rename to mastrep.py index 465b064..22cc282 100755 --- a/mastodon_replier.py +++ b/mastrep.py @@ -6,6 +6,7 @@ from mastodon_main import publishStrip import json import os import sys +import time fileDir = os.path.dirname(os.path.abspath(__file__)) fileDir = fileDir + "/" @@ -39,4 +40,8 @@ if __name__ == "__main__": TOKEN = createapp[0] mastodon = Mastodon(access_token = TOKEN,api_base_url = API_URL) listener = stripListener() - mastodon.stream_user(listener) + while True: + try: + mastodon.stream_user(listener) + except: + time.sleep(10)