From d974b987f16443b111786d263ff6507418862ebc Mon Sep 17 00:00:00 2001 From: Dhohir Pradana Date: Thu, 19 Oct 2023 08:42:37 +0700 Subject: [PATCH] fix: search_tweets --- app.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index 0959d6a..b4b37c8 100644 --- a/app.py +++ b/app.py @@ -47,17 +47,19 @@ def updateName(): name = calendar_emoticon + " " + d_indonesia api.update_profile(name=name) + def updateStatus(): text = "" api.update_status(status=text) - + + def getTweetAndRetweet(): # Search for tweets (you can customize the query) search_query = "Teknologi" tweet_count = 10 # Number of tweets to retrieve - tweets = api.search(q=search_query, count=tweet_count) - + tweets = api.search_tweets(q=search_query, kwargs={"count": tweet_count}) + # Generate a random number between 0 and 9 (inclusive) random_number = random.randint(0, 9) @@ -87,4 +89,4 @@ def updateBanner(): if __name__ == "__main__": getTweetAndRetweet() # updateName() - #updateBanner() + # updateBanner()