I want to loop this script every 30 seconds.
tweets = tweepy.Cursor(api.search_tweets, q='safe dev', lang='en', tweet_m开发者_如何学Pythonode='extended').items(100)
print(tweet.full_text, tweet.created_at)
I tried while true but it's not showing results.
import time
for index in range(0 , to_numbers_of_loops):
#here you can define the time you want to run the script in your case 30 seconds
time.sleep(30)
tweets = tweepy.Cursor(api.search_tweets, q='safe dev', lang='en', tweet_mode='extended').items(100)
print(tweet.full_text, tweet.created_at)
精彩评论