我在 Python 中使用 Tweepy 运行 REST API(搜索 API)。我在家里完成了这个程序,一切都很好。但现在我正在不同的网络中处理这个问题,我收到了错误消息。
SSLError: ("bad handshake: Error([('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')],)",)
我的代码是这样的。
auth = tweepy.AppAuthHandler(consumer_key, consumer_secret)
api = tweepy.API(auth,wait_on_rate_limit=True, wait_on_rate_limit_notify=True)
我发现这篇
Python Requests throwing up SSLError
并设置以下代码 ( verify = false
) 可能是一个快速的解决方案。有谁知道如何在tweepy中做到这一点或其他方式?谢谢你。