Skip to content
This repository was archived by the owner on Apr 17, 2025. It is now read-only.

avoid infinite loop when dead proxy is passed via requests_args - #519

Open
Kirill (avant1) wants to merge 1 commit into
GeneralMills:masterfrom
avant1:avoid-infinite-loop
Open

avoid infinite loop when dead proxy is passed via requests_args#519
Kirill (avant1) wants to merge 1 commit into
GeneralMills:masterfrom
avant1:avoid-infinite-loop

Conversation

@avant1

Copy link
Copy Markdown
Contributor

When dead proxy is passed via request_args, TrendReq.GetGoogleCookie() will loop infinitely in attempt to execute request.

This is not very useful by itself, and also contradicts handling of proxies passed via proxies parameter (in that case all proxies are checked, and error is thrown in case if all proxies are dead).

As for backward compatibility, I think this patch doesn't change much. Only one proxy can be passed via request_args, so when given proxy works only 50% of the time, it will likely fail during subsequent requests.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant