tweetbotornot icon indicating copy to clipboard operation
tweetbotornot copied to clipboard

Rate limit handling?

Open henriklied opened this issue 6 years ago • 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?

henriklied avatar Mar 22 '18 12:03 henriklied

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

Kudusch avatar Mar 27 '18 12:03 Kudusch

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

yongleZ avatar Jul 08 '18 20:07 yongleZ

Same problem here.

brainprint avatar Aug 14 '18 16:08 brainprint

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

Hawkeye407 avatar Nov 04 '18 13:11 Hawkeye407

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)

uluturki avatar Mar 25 '19 23:03 uluturki

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), ]

victorgois avatar May 16 '19 20:05 victorgois

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

kuyaKS avatar Jun 07 '19 06:06 kuyaKS