From 3f442e0f9185a7697c169eaced6f85236a8c5cc9 Mon Sep 17 00:00:00 2001 From: b3yond Date: Sun, 18 Jun 2017 01:06:59 +0200 Subject: [PATCH] fixed some last bugs, retweetbot.py should work again now. --- goodlist | 2 -- retweetbot.py | 13 ++++++------- trigger.pyc | Bin 2006 -> 2435 bytes 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/goodlist b/goodlist index 1463537..128fc08 100644 --- a/goodlist +++ b/goodlist @@ -1,5 +1,4 @@ kontrolle -ticketfrei konti db zivil @@ -11,7 +10,6 @@ bahn tram linie nuernberg -nbg nürnberg s1 s2 diff --git a/retweetbot.py b/retweetbot.py index 6ce1b17..f0e7ddc 100644 --- a/retweetbot.py +++ b/retweetbot.py @@ -122,12 +122,12 @@ class RetweetBot(object): """ while 1: try: - print self.api.PostRetweet(status.id) + self.api.PostRetweet(status.id) return self.format_mastodon(status) - # Hopefully we got rid of this error. If not, try to uncomment these lines. - # except twitter.error.TwitterError: - # print("[ERROR] probably you already retweeted this tweet.") - # done = True + # maybe one day we get rid of this error. If not, try to uncomment these lines. + except twitter.error.TwitterError: + print("[ERROR] probably you already retweeted this tweet.") + return None except requests.exceptions.ConnectionError: print("[ERROR] Bad Connection.") sleep(10) @@ -169,7 +169,6 @@ class RetweetBot(object): # save the id so it doesn't get crawled again self.last_mention = status.id - print self.last_mention # debug # Return Retweets for tooting on mastodon return mastodon @@ -185,7 +184,7 @@ if __name__ == "__main__": # create an Api object bot = RetweetBot() while True: - sleep(10) bot.flow() + sleep(10) #except: # bot.shutdown() diff --git a/trigger.pyc b/trigger.pyc index 3a79646c9876915b941a04477599d15d34d68c4f..301bc27d6ce7b69dd0e1532c32e9a8691978e428 100644 GIT binary patch delta 629 zcmZ8eO>Yx15S`g<>}0!Xt3m}xh+1%9fqqFyd<2P0dIc$4q#z_zExT^Bq}dI&p&$Z1 z6mgF%{sEjhloLpZJ9qvFcf@#83c^}HzwvwH8GC=s9h_jbpRM4-rwKE7WAbvnl`(h& z@PI+Q8S%+Sjo<7AymJ=daUI5lJ{+JUTRx1viZHu}SFgRTIEP*a(7o@RQ$PRX=RnG4 zM&-qh-YN&S?p?x$UGsYT^CSQ^aRFCx(VMQRORXKv4z2nk z!E*s)gpG%%;T1LIL548!Kyi5O!4vMj9_iES`aLBC;%IdGG9742ZJ6SI)bm;#mUY*j_(R`>xsQxKU#IabUZwduEM9?QFmphSg69 uv4s)0U)b_|Nc&aU_>^Pk?3mxS>pTcukF3UUZl*b7H~4j2BB@uq8RBobmw^-j delta 238 zcmZn`zQ)hS{F#^Q^sQ=Dp@^S!`m9PMb^8BKd$@kbL7&#|@XAhKA z0tyxL0SN{+Hbx$h5sW;Hyo?%blM^{~xVeGiK_VbRX7XGP4=#`?Y|Lzo{G5|Na+ov9 Q0tM|Rr*ld&>+moF0HM7tvH$=8