fixed some last bugs, retweetbot.py should work again now.

This commit is contained in:
b3yond 2017-06-18 01:06:59 +02:00
parent a34c1d260f
commit 3f442e0f91
3 changed files with 6 additions and 9 deletions

View file

@ -1,5 +1,4 @@
kontrolle
ticketfrei
konti
db
zivil
@ -11,7 +10,6 @@ bahn
tram
linie
nuernberg
nbg
nürnberg
s1
s2

View file

@ -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()

Binary file not shown.