trevorhobenshield / twitter-api-client

Implementation of X/Twitter v1, v2, and GraphQL APIs
https://pypi.org/project/twitter-api-client
MIT License
1.54k stars 207 forks source link

Connection Error #171

Open Louis24 opened 8 months ago

Louis24 commented 8 months ago

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.twitter.com', port=443): Max retries exceeded with url: /1.1/guest/activate.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001A470D19C40>: Failed to establish a new connection: [WinError 10060] 由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。'))

Louis24 commented 8 months ago

The location is based China, but I have added import socks

socks.set_default_proxy(socks.SOCKS5, "proxy_host", 7890)