2016-07-24 29 views
0

fand ich diesen CodeWie antworte ich mit Tweepy auf den letzten Tweet eines bestimmten Benutzers?

toReply = "xxx" 
api = tweepy.API(auth) 



tweets = api.user_timeline(screen_name = toReply, count=1) 

for tweet in tweets: 
api.update_status("@" + toReply + " my reply", in_reply_to_status_id = tweet.id) 

Aber es ist nicht das, was ich suche. Es antwortet nur auf den neuesten Tweet. Ich möchte, dass der Bot jedes Mal xxx Tweets antwortet. Was sollte ich in meinem Code ändern?

Antwort

2
while True: 
    for tweet in api.user_timeline(...):