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

Not Retrieving All of a User's Timeline When Under 3200 Tweets #320

Closed
pravin-santhanam27 opened this issue Mar 7, 2019 · 3 comments
Closed
Labels

Comments

@pravin-santhanam27
Copy link

pravin-santhanam27 commented Mar 7, 2019

Hello,

I am running the following loop to scrape around 60 user's timelines and expecting to get 3200 tweets for each user if they have more than 3200, or the maximum number of tweets they have if its less than 3200. The code for the loop is below:

print("Querying All Player Tweets")
tweetQuery <- vector("list",n)

for (i in seq_along(tweetQuery)) {
tweetQuery[[i]] <- get_timeline(twitterHandles[i,]$Handle, n = 3200)
## assuming full rate limit at start, wait for fresh reset every 52 users
if (i %% 52L == 0L) {
rl <- rate_limit("get_timeline")
Sys.sleep(as.numeric(rl$reset, "secs"))
}
## print update message
cat(i, " ")
}

tweetQuery <- do_call_rbind(tweetQuery)

However, for some guys that have less than 3200 tweets, it does not pull all of their tweets. For example, an account that has 352 tweets, the loop above for that user returned only 328. Is there a reason for this? And does it have to do with looping through many users and the rate limit being exceeded mid-loop?

Thanks for your help.

@pravin-santhanam27
Copy link
Author

I think the reason for the discrepency is that the twitter user_timeline function does not get replies, but only tweets and retweets. On the twitter website, the tweet count includes replies, so there can be many more than what is returned from the rtweet get_timeline function. Can anyone confirm this? I want to make sure I am getting as many tweets as possible under the 3200 limit.

@sadettindemirel
Copy link

I came across with a similar problem. Normally I set the get_timeline() function with the n = 3200 but I can only get fewer number of tweets. In the past I mean like 5 months ago I can reach at least over 3000 tweets. This might happen because of a change in Twitter API Policy or limits.

@llrs llrs mentioned this issue Feb 15, 2021
@llrs llrs added the bug label Feb 16, 2021
@hadley
Copy link
Member

hadley commented Feb 27, 2021

Now tracking in #510

@hadley hadley closed this as completed Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants