-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for scraping tweet based on its ID #137
Comments
There is no explicit support for this at the moment, but I intend to add something that also covers #51 and a reimplementation of #12 (cf. #98 (comment)). As a workaround, it's possible to fetch individual tweets through the search using the
If that produces no result, put a
The Note that this is quite inefficient since you have to run a separate search for every tweet ID. If you have a lot of tweets, this is probably not a good idea. However, my upcoming implementation likely won't fare any better. |
Hello, I've been looking for methods to get tweets from a list of IDs and this seems like a workable solution. However, I've noticed that from the list I've been using, less than 20% of the queries return tweet information. Doing manual checking for the IDs, most of them do exist, and I think the differentiating factor is that the tweets not being returned seem to be Retweets. I couldn't find anything that was filtering out retweets, so I was wondering if you knew of a way to get access to the tweets even when they are retweets. I had also tried looking at TwitterThreadScraper, but could not get that working in any capacity. Thank you! |
@maclean-alexander See #83 and #8. Basically, it isn't possible to reliably extract information on retweets because Twitter's search doesn't return them. I have not yet found time to look into implementing this, so no idea whether/how this will work with regards to retweets. Also, yes, TwitterThreadScraper is broken (#98 (comment)). |
Ah ok, thank you for the quick response. |
This comment has been minimized.
This comment has been minimized.
How can I scrap data using tweet id with the updated module? |
CLI: |
Hey, I want to know, how to get the tweet using the tweet ID |
I tried the above python code, it says : AttributeError: module 'snscrape.modules.twitter' has no attribute 'TwitteTweetScraper' |
Please make sure you're running Python 3.8 or later and the latest version of snscrape. |
Thanks for the quick response. Yeah I did. But still doesn't seem to work. |
You spelled it wrong, it's |
oh yeah, thanks a lot |
AttributeError: module 'snscrape.modules.twitter' has no attribute 'TwitterTweetScraper', I'm still getting this error |
I was wondering if we could use snscrape to fetch the tweet text for a given twitter status id or a set of status ids. I could not find this in the documentation.
The text was updated successfully, but these errors were encountered: