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

Thousands of missing tweets #90

Open
Tarrgon opened this issue Jun 19, 2024 · 3 comments
Open

Thousands of missing tweets #90

Tarrgon opened this issue Jun 19, 2024 · 3 comments

Comments

@Tarrgon
Copy link

Tarrgon commented Jun 19, 2024

I'm unsure if I'm using this tool wrong, but I'm trying to fetch basically every tweet from a user. When I do this, though, I'm only getting 829 tweets, of their 42,000. Added logs to the module directly showing that getTweetTimeline has an empty array tweets that breaks out of the function.

Is there any way to get more tweets than this?

For reference, here's the code:

for await (let tweet of twitterScraper.getTweets(identifier, Number.MAX_SAFE_INTEGER)) {
   // ...
}

There's no exhausted auth or anything, just runs out of tweets for seemingly no reason.

@Tarrgon
Copy link
Author

Tarrgon commented Jun 19, 2024

I should add that

tweets = twitterScraper.searchTweets(`(from:${identifier})`, Number.MAX_SAFE_INTEGER, SearchMode.Latest)

seems to go past 1000 just fine.

@Tarrgon
Copy link
Author

Tarrgon commented Jun 20, 2024

I should add that

tweets = twitterScraper.searchTweets(`(from:${identifier})`, Number.MAX_SAFE_INTEGER, SearchMode.Latest)

seems to go past 1000 just fine.

However, sometimes it just doesn't fetch everything for some reason, but probably something to do with the times when it just doesn't load

@catdevnull
Copy link
Contributor

It seems that Twitter/X cuts off timelines like those after a certain (unknown?) point. We can abuse the search API to get tweets from someone, but note that it doesn't include retweets. See here: https://socialdata.gitbook.io/docs/twitter-tweets/retrieve-search-results-by-keyword#using-search-operators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants