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

feat(lookup): handle Cloudflare DDoS protection #1434

Merged
merged 2 commits into from
Dec 17, 2020
Merged

feat(lookup): handle Cloudflare DDoS protection #1434

merged 2 commits into from
Dec 17, 2020

Conversation

neatchee
Copy link
Contributor

@neatchee neatchee commented Dec 16, 2020

Description

Resolves #1297

  • Move response handling to a function that can be called recursively
  • Check 503 responses for Cloudflare's "attribution" div + link text
  • If we hit a Cloudflare page, do page.waitForNavigation and then call response handling again (recursively)

Testing

Set store = "zotac"
Set brand & model = ""
Set series = "3070, 3080, 3090"
Run and observe output

Prior result: Frequent 503 errors due to Cloudflare protection

New result: Periodic "CLOUDFLARE, WAITING" message followed shortly by success (typically OUT OF STOCK)

@neatchee neatchee reopened this Dec 16, 2020
@neatchee
Copy link
Contributor Author

I'm not bad at git, you're bad at git >.>

Copy link
Owner

@jef jef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Thank you very much for this. This is really going to be a big quality of life!

@jef jef merged commit f86a825 into jef:main Dec 17, 2020
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.

Wait for cloudflare DDoS screens
2 participants