Closed ryuujo1573 closed 2 years ago
Hello @ryuujo1573 Indeed the next_results url field is not very useful with this library as it builds the urls for you. What you do should work and I don't see anything incorrect although I agree it does not look very good :) If you look at it closely you will notice it's exactly the same args you passed to your first call, with just "max_id=SOMETWEETID" added within. So what I usually do and would recommand is rather to work with an args dict that you can reuse (notice the count argument to get more tweets by call):
async def main():
args = {'q': 'china poverty', 'tweet_mode': 'extended', 'count': 100}
while 'max_id' not in args or len(tweets['statuses']):
tweets = t.search.tweets(**args)
await save(tweets)
args['max_id'] = tweets['search_metadata']['max_id']
wow, thanks! this looks elegant. closing issue, thank you again xd
Thank you a lot for your work, which saved my life from being wasted. I ran into some problem. emmmm code first...
From Twitter API docs giving
Example Response
I know that I can extend my request to another batch result by using param$.search_metadata.next_results
directly, but it seems it's not the correct way to do this, which feels like boxing and unboxingWhat should I do?