R twitteR 包,尽管有限制,但仍能获得关注者 [英] R twitteR package, get followers despite limit
问题描述
我一直在玩 R twitteR
包,但还没有想出如何实现一个系统来收集超过每小时 #
的最大关注者对于 Twitter 用户.
我知道计划应该是收集最大值,等待 X 时间,然后重复直到收集所有,但是我如何使用 twitteR
包来做到这一点?getFollowers(n)
过程每次只会获得相同的 n 个关注者.
I've been playing around with the R twitteR
package and haven't figured out how to implement a system to collect more than the maximum per hour #
of followers for a twitter user.
I know the plan should be to collect the maximum, wait X amount of time, then repeat until all are collected, but how do I do this with the twitteR
package?
the getFollowers(n)
process would just keep getting the same n followers each time.
推荐答案
尝试将 blockOnRateLimit=TRUE 添加到您的通话中.它会坐等它完成(这可能是很长时间,具体取决于您的请求的大小).这是一个隐藏的"参数,因为我不确定我是否想保持它的原样 - 事实上,它几乎肯定会在下一个版本中有所改变,但现在它应该让你到达你的位置该走了.
Try adding blockOnRateLimit=TRUE to your call. It'll sit and wait until it can complete (which could be a long time depending on the size of your request). It is a 'hidden' arg as I wasn't sure if I wanted to keep it the way it is or not - and in fact it is almost certainly going to change somewhat for the next version but for now it should get you where you need to go.
这篇关于R twitteR 包,尽管有限制,但仍能获得关注者的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!