Open yl4318 opened 4 years ago
Hi @yl4318, the GetFollowerIDsPaged
function is on the twitter.Api
object (from the python-twitter package), which is passed to each TwitterOperator
here. Did you install the requirements with pip install -r requirements.txt
?
What is the error you're experiencing with parallel_client.get_followers
? Just so we're on the same page, your code should look something like:
from parallel_twitter.parallel_client import oauth_dicts_to_apis, ParallelTwitterClient
TWITTER_API_CONSUMER_KEY = ...
TWITTER_API_CONSUMER_SECRET = ...
OAUTHS = [
{
'oauth_token': ...,
'oauth_token_secret': ...
},
{
'oauth_token': ...,
'oauth_token_secret': ...
},
...
]
apis = parallel_twitter.oauth_dicts_to_apis(
oauth_dicts=OAUTHS,
api_consumer_key=TWITTER_API_CONSUMER_KEY,
api_consumer_secret=TWITTER_API_CONSUMER_SECRET
)
client = ParallelTwitterClient(apis=apis)
client.get_followers(user_id=...)
Hi, I've read this code and found that a function is not defined:
I am not sure where is GetFollowerIDsPaged defined. Also I tried run get_followers and could not get a large list.