From 565fced8bae9ac87a4bae489c261f8d3157e5890 Mon Sep 17 00:00:00 2001 From: RandomisedName Date: Mon, 15 May 2017 18:49:05 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=82=D0=B2=D0=B8=D1=82=D1=82?= =?UTF-8?q?=D0=B8=D0=BC=20=D1=82=D0=B2=D0=B8=D1=82=D1=82=D1=8B=20=D1=81?= =?UTF-8?q?=D0=BE=D0=B4=D0=B5=D1=80=D0=B6=D0=B0=D1=89=D0=B8=D0=B5=20#Twitt?= =?UTF-8?q?erShitter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TwitterBot.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/TwitterBot.py b/TwitterBot.py index 3ce174f..7c69777 100644 --- a/TwitterBot.py +++ b/TwitterBot.py @@ -9,6 +9,7 @@ import string import random import filecmp import shutil +from pprint import pprint import PIL from PIL import Image, ImageDraw, ImageFont @@ -60,6 +61,13 @@ def main(): twitter.update_status_with_media(status = str, media = tweetimg) print('https://imgur.com/'+id+'.jpg '+str) + search_results = twitter.search(q="#TwitterShitter", count=5) + try: + for tweet in search_results["statuses"]: + twitter.retweet(id = tweet["id_str"]) + except TwythonError as e: + print e + time.sleep (60*30) if __name__ == '__main__':