Closed shawnzam closed 6 years ago
PS, Here is the relevant section of code:
botometer_api_url = 'https://botometer-pro.p.mashape.com'
bom = botometer.Botometer(botometer_api_url=botometer_api_url,
wait_on_ratelimit=True,
mashape_key=credentials.mashape_key,
**credentials.twitter_app_auth)
df = pd.read_csv(tweets_file, encoding = "ISO-8859-1")
accounts = numpy.unique(df['preferredUsername'].values)
account_size = accounts.size
print("Found {} uniq preferredUsernames".format(account_size))
for i, (screenname, result) in enumerate(bom.check_accounts_in(accounts)):
print("{} of {}".format(i, account_size))
put a pull request in #17
Thanks for this important change to support our paid API!
PS, I'm thinking about how v2 of this library should look. If you have suggestions, please share them in this new issue.
It looks like when trying to use the pro api and the
check_accounts_in
method theapi_url
is set back to the basic endpoint. If you would like a pull, happy to give it a try.https://github.com/IUNetSci/botometer-python/blob/master/botometer/__init__.py#L130