From 0dc17d65f0476fd2e94e98ab0921dec8ff43544f Mon Sep 17 00:00:00 2001 From: b3yond Date: Thu, 18 Jan 2018 20:15:41 +0100 Subject: [PATCH] added more save_last(), schadet nicht --- retweetbot.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/retweetbot.py b/retweetbot.py index 8d99196..88fd2fb 100755 --- a/retweetbot.py +++ b/retweetbot.py @@ -141,6 +141,7 @@ class RetweetBot(object): logger.info("Retweeted: " + status.format()) if status.id > self.last_mention: self.last_mention = status.id + self.save_last() return status.format() except requests.exceptions.ConnectionError: logger.error("Twitter API Error: Bad Connection", exc_info=True) @@ -150,6 +151,7 @@ class RetweetBot(object): logger.error("Twitter Error", exc_info=True) if status.id > self.last_mention: self.last_mention = status.id + self.save_last() return None def post(self, status): @@ -194,10 +196,6 @@ class RetweetBot(object): if toot: all_tweets.append(toot) - # save the id so it doesn't get crawled again - if status.id > self.last_mention: - self.last_mention = status.id - self.save_last() # Return Retweets for posting on other bots return all_tweets