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

Fix when fast = TRUE only able to check 180 users per 15 min, not 90000 users #29

Open
wants to merge 20 commits into
base: master
Choose a base branch
from

Conversation

Jupaoqq
Copy link

@Jupaoqq Jupaoqq commented Jun 19, 2019

This proposed change will fix the issues mentioned in issue #23 and #24, which is even with the fast argument on, this API could only check 180 users per 15 minutes, instead of 90000 users per 15 minutes. With this fix, this API is able to check 90000 users per 15 minutes.

in line 89 to 96 of
tweetbotornot/R/tweetbotornot.R

I changed

botornot.character <- function(x, fast = FALSE) {
x <- x[!is.na(x) & !duplicated(x)]
x <- rtweet::get_timelines(x, n = 100)
botornot(x, fast = fast)
}

to

botornot.character <- function(x, fast = FALSE) {
x <- x[!is.na(x) & !duplicated(x)]
if (fast)
{
x <- rtweet::lookup_users(x)
}
else
{
x <- rtweet::get_timelines(x, n = 100)
}
botornot(x, fast = fast)
}

so that it only takes user-level data if fast argument is on, without looking at user's timeline which only has a rate limit of 180 users / 15 minutes.

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

Successfully merging this pull request may close these issues.

None yet

1 participant