想利用botometer来测试机器人账号,这是我的代码,从官档下载的:
import botometer
rapidapi_key = "9d69e3bcffmshac93fcc436e647ap15edf5jsnd6649d05711c"
twitter_app_auth = {
'consumer_key': '·············',
'consumer_secret': '·················',
'access_token':'·······················',
'access_token_secret':'······························'
}
bom = botometer.Botometer(wait_on_ratelimit=True,
rapidapi_key=rapidapi_key,
**twitter_app_auth)
# Check a single account by screen name
result = bom.check_account('@Hog8oy')
'''
# Check a single account by id
result = bom.check_account(1548959833)
# Check a sequence of accounts
accounts = ['@clayadavis', '@onurvarol', '@jabawack']
for screen_name, result in bom.check_accounts_in(accounts):
# Do stuff with `screen_name` and `result`
'''
print(result)
但是在运行过后出现了这个问题,查了半天也没有头绪:
tweepy.error.TweepError: Failed to send request: HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /1.1/statuses/user_timeline.json?id=%40Hog8oy&include_rts=True&count=200 (Caused by ProxyError('Cannot connect to proxy.', timeout('_ssl.c:1106: The handshake operation timed out')))
请大家帮忙!谢谢!