0

I want to loop this script every 30 seconds.

tweets = tweepy.Cursor(api.search_tweets, q='safe dev', lang='en', tweet_mode='extended').items(100)
print(tweet.full_text, tweet.created_at)

I tried while true but it's not showing results.

Wolric
  • 701
  • 1
  • 2
  • 18
0xCAJ
  • 1
  • 2
  • Does [this](https://stackoverflow.com/questions/474528/how-to-repeatedly-execute-a-function-every-x-seconds?rq=1) help you? – Wolric Dec 06 '22 at 23:53
  • 1
    Show the code that didn't work. A `while` and a `sleep` should work. – tdelaney Dec 06 '22 at 23:58
  • while True: for tweet in tweets: time.sleep(5) print(tweet.full_text, tweet.created_at) – 0xCAJ Dec 07 '22 at 00:15
  • My problem is it's showing each results every 5 seconds but what I am trying to do is repeat the function. What I am trying to do is instead of keep clicking the run script. I want it to run every 30 seconds so I can keep track if there's any new data would show up. – 0xCAJ Dec 07 '22 at 00:17

0 Answers0