【问题标题】:HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with urlHTTPSConnectionPool(host='api.twitter.com', port=443): url 超出最大重试次数
【发布时间】:2020-10-31 19:44:39
【问题描述】:

我正在尝试根据他们的文档使用 Twython、tweepy 模块来抓取 Twitter。每次都被最大条目限制卡住:

#python 3.8.2
#twython 3.8.2

from twython import Twython
twitter = Twython(APP_KEY, APP_SECRET,
              OAUTH_TOKEN, OAUTH_TOKEN_SECRET)

twitter.verify_credentials(verify = False)
twitter.get_home_timeline()

错误

twython.exceptions.TwythonError: HTTPSConnectionPool(host='api.twitter.com', port=443): url: /1.1/account/verify_credentials.json 超过最大重试次数(由 NewConnectionError(': 无法建立新连接:[Errno 101] Network is unreachable'))

任何建议我缺少什么?

【问题讨论】:

    标签: python-3.x http twitter twython


    【解决方案1】:

    您收到此错误只是因为 twitter 在您所在的地区被过滤/禁止! 尝试使用代理连接!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-08-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-18
      • 2022-10-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多