mkearney/tweetbotornot

Rate limit handling?

henriklied opened this issue · 7 comments

I see that rtweet supports a parameter called retryonratelimit, but I cannot find this parameter in the botrnot package. I have a list of about 1 million user IDs to classify, so I need rate limiting handled properly.

Any suggestions?

I'm interested in this as well. Passing rtweets retryonratelimit to botrnot would be a great start.

Hi, have you fixed this issue yet? I came into the same problem and need some help.

Same problem here.

Same problem... retryonratelimit will be very handy...

You can call the classifier function as follows to have retryonratelimit functionality (slightly modified from the readme):

## get most recent 100 tweets from each user
tmls <- get_timelines(users, n = 100, retryonratelimit = TRUE)

## pass the returned data to botornot()
data <- botornot(tmls)

You can call the classifier function as follows to have retryonratelimit functionality (slightly modified from the readme):

## get most recent 100 tweets from each user
tmls <- get_timelines(users, n = 100, retryonratelimit = TRUE)

## pass the returned data to botornot()
data <- botornot(tmls)

How this works?

I am trying to parse a list of 70k "rows" and all I get is 'Warning: Rate limit exceeded - 88'

I am also having problems when I pass my list through parameter in the botornot(). It does not accept list as parameters. I just gave up to pass all the database manually as parameter.

My code trying to pass a list as parameter

## load package
library(tweetbotornot)
library(rtweet)
library(reticulate)

users <- c(py_run_file("script.py"))
#vector <- unlist(users)
users <- c(users)
**#  method not applicable to 'botornot' applied to a class object "list"**
data <- botornot(users)

data[order(data$prob_bot), ]

I'm having the same problem. Is there already an update on how to handle rate limits in order to test thousands of usernames?