请求失败:Google返回了一个代码为429的响应

2024-09-30 05:30:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图使用Pytrends从谷歌趋势中收集大量数据,但不断得到429 error。我怎样才能避免这种情况?购买代理权会有帮助吗? 我尝试了在线可用的免费代理,但不断出现以下错误:

ProxyError: HTTPSConnectionPool(host='trends.google.com', port=443): Max retries exceeded with url: /?geo=US (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out')))

以下是我尝试的代码:

from pytrends.dailydata import  get_daily_data
get_daily_data("AAPL", 2017, 1, 2017, 5, proxies=["http://35.169.156.54:3128"])

Tags: 数据host代理dataget错误情况error

热门问题