tweetbotornot icon indicating copy to clipboard operation
tweetbotornot copied to clipboard

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

Open Jupaoqq opened this issue 5 years ago • 0 comments

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.

Jupaoqq avatar Jun 19 '19 14:06 Jupaoqq