Rishikant181 / Rettiwt-API

A CLI tool and an API for fetching data from Twitter for free!
https://rishikant181.github.io/Rettiwt-API/
MIT License
352 stars 33 forks source link

What's the best way to use this package to get a long list of tweet ids? #241

Closed karam-khanna closed 1 year ago

karam-khanna commented 1 year ago

Looking to get a list of a couple hundred thousand tweets which I have in a list of IDs, and wasn't sure if there was a better way with this package rather than running individual requests for each ID.

Rishikant181 commented 1 year ago

Unfortunately, there is no such method for fetching the details, given a list of Tweet IDs. The only way is to make different requests.

I am willing to work on this feature, but I first need to evaluate the practicality of this, because it's not often that a user has obtained a bunch of Tweet IDs before-hand and is using this library to fetch their details. Are there some examples of this specific use case?

karam-khanna commented 1 year ago

Got it.

The best use case I have is for building existing data sets of tweets, legally speaking you're not supposed to publish the tweets themselves, but rather a list of the tweet IDs. So if you're working with Twitter datasets, you need to turn a list of IDs into a dataframe of tweets. I think a lot of people use Hydrator now, but your package has a lot of nice functionality they don't.

If you want to see some of those datasets, I think a lot of academic papers reference them

Rishikant181 commented 1 year ago

Okay so functionality that is needed is basically providing a way to fetch the details of a list of Tweet IDs, right?

karam-khanna commented 1 year ago

Yup! A major issue with the existing solutions for this kinda thing is they run into like IP blocks and stuff so if you had a way around that it would be a big value add. I’d check out DocNow/hydrator for an example.

On Fri, Feb 17, 2023 at 2:20 AM Rishikant Sahu @.***> wrote:

Okay so functionality that is needed is basically providing a way to fetch the details of a list of tweet id right?

— Reply to this email directly, view it on GitHub https://github.com/Rishikant181/Rettiwt-API/issues/241#issuecomment-1434215357, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCBE2VZFUC65WITINSQ2L3WX4RFTANCNFSM6AAAAAAUXCGHSQ . You are receiving this because you authored the thread.Message ID: @.***>

Rishikant181 commented 1 year ago

Got it.

I'll start working on it. Thanks for the feedback!

karam-khanna commented 1 year ago

Good luck! Great package by the way!

On Fri, Feb 17, 2023 at 2:32 AM Rishikant Sahu @.***> wrote:

Got it.

I'll start working on it. Thanks for the feedback!

— Reply to this email directly, view it on GitHub https://github.com/Rishikant181/Rettiwt-API/issues/241#issuecomment-1434234926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUCBE2UQDEWEFROIUGUDI7LWX4SPPANCNFSM6AAAAAAUXCGHSQ . You are receiving this because you authored the thread.Message ID: @.***>

Rishikant181 commented 1 year ago

Okay so I tried to add functionality to fetch details of multiple Tweet IDs, but the problem is that it doesn't actually do anything better than looping over the method to get details of one tweet. Furthermore, it makes the error handling when fetching details of any single tweet from the list of IDs fails, owing to the absence of the tweet.

The best way to fetch the details of a list of Tweet IDs remains looping over the IDs and calling the method for each ID.