Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

avant1
Copy link
Contributor

@avant1 avant1 commented Jun 10, 2022

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.

@avant1 avant1 force-pushed the avoid-infinite-loop branch from 72be67c to 37b4494 Compare March 10, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant