Closed changchiyou closed 5 months ago
I want to retrieve latest posts made by a specific Twitter user, but I'm only able to get relatively older posts.
My Code
from tweety import Twitter twitter = Twitter("SESSION") tweets = twitter.get_tweets(username='wildrift', pages=5) tweets = sorted(list(tweets), key=lambda tweet: tweet.created_on, reverse=True) for tweet in tweets[:10]: print(tweet)
Execution Result
Only retrieved the latest post published on 2024-04-09 22:26:31+00:00 with ID 1777825448531255591; unsuccessful in fetching newer posts:
Tweet(id=1777825448531255591, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2024-04-09 22:26:31+00:00) Tweet(id=1762643996742922406, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2024-02-28 01:00:51+00:00) Tweet(id=1726405222237450733, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2023-11-20 01:00:54+00:00) Tweet(id=1722781430973866277, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2023-11-10 01:01:15+00:00) Tweet(id=1697066768202686857, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2023-08-31 02:00:22+00:00) Tweet(id=1673440513268269056, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2023-06-26 21:18:04+00:00) Tweet(id=1673359345629925377, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2023-06-26 15:55:32+00:00) Tweet(id=1587882236396838912, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2022-11-02 19:00:01+00:00) Tweet(id=1554497260569903110, author=User(id=1171151232636878848, username=wildrift, name=League of Legends: Wild Rift, verified=True), created_on=2022-08-02 16:00:02+00:00)
Expect
Retrieve the latest post, which was published 3 hours ago:
duplicated https://github.com/mahrtayyab/tweety/issues/136
Are you authenticated?
@mahrtayyab I have already solved this issue by using advance search (refer to https://github.com/mahrtayyab/tweety/issues/136).
I want to retrieve latest posts made by a specific Twitter user, but I'm only able to get relatively older posts.
My Code
Execution Result
Only retrieved the latest post published on 2024-04-09 22:26:31+00:00 with ID 1777825448531255591; unsuccessful in fetching newer posts:
Expect
Retrieve the latest post, which was published 3 hours ago: