Skip to content
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

How can I filter replies and get only the original tweets? #294

Closed
valalithak opened this issue Oct 20, 2021 · 3 comments
Closed

How can I filter replies and get only the original tweets? #294

valalithak opened this issue Oct 20, 2021 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@valalithak
Copy link

I'm currently using the dev version but did not find any attribute which lets me identify if a tweet is original or a reply to some other tweet @JustAnotherArchivist any help would be appreciated.

@JustAnotherArchivist
Copy link
Owner

Getting only original tweets on a search scrape: add -filter:replies to your query, e.g. from:nasa -filter:replies
Determining whether a snscrape.modules.twitter.Tweet is original or a reply: tweet.inReplyToTweetId being None means it's an original tweet.

@JustAnotherArchivist JustAnotherArchivist added module:twitter question Further information is requested labels Oct 20, 2021
@JustAnotherArchivist
Copy link
Owner

Note that -filter:replies (and its equivalent exclude:replies) will also filter out self-replies, e.g. second and later tweets in a thread.

Also, this is a duplicate of #45.

@JustAnotherArchivist JustAnotherArchivist added duplicate This issue or pull request already exists and removed question Further information is requested module:twitter labels Oct 20, 2021
@valalithak
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants