HTTP 错误 429 请求过多 - 删除 cookie

HTTP Error 429 Too Many Requests - delete cookies

我正在使用模块 google 搜索网络抓取,但出现错误 429。我再次尝试卸载并安装模块,但没有帮助。所以我的下一个想法是删除 cookie,但我不知道该怎么做。你能帮帮我吗?

query = 'site:https://whosebug.com urllib.error.HTTPError: HTTP Error 429: Too Many Requests'
search_query = search(query=query, stop=10)
for url in search_query:
print(url)

429 个请求太多

The HTTP 429 Too Many Requests response status code indicates that the user has sent too many requests in a given amount of time ("rate limiting"). The response representations SHOULD include details explaining the condition, and MAY include a Retry-After header indicating how long to wait before making a new request.

Note that this specification does not define how the origin server identifies the user, nor how it counts requests. For example, an origin server that is limiting request rates can do so based upon counts of requests on a per-resource basis, across the entire server, or even among a set of servers. Likewise, it might identify the user by its authentication credentials, or a stateful cookie.

您在短时间内发送的请求过多。根据您的使用场景,Custom Search API 可能会有用。如果不是,那么您可能必须为您的呼叫使用代理,或实施等待和重试机制

我的问题已解决:https://support.google.com/gsa/answer/4411411#requests

How to disable cookie handling with the Python requests library?