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

Amazon Captcha Fix suggestion #1504

Closed
roachadam opened this issue Dec 24, 2020 · 9 comments · Fixed by #1542
Closed

Amazon Captcha Fix suggestion #1504

roachadam opened this issue Dec 24, 2020 · 9 comments · Fixed by #1542

Comments

@roachadam
Copy link

Expected Behavior

Amazon stock check works consistently without anti bot page.

Current Behavior

Without large delay in checking, amazon continuously returns anti bot captcha page.

Steps to Reproduce

  1. Use latest version, amazon will eventually start throwing the bot page.

Suggestion

Implement randomized requests in between page requests. Every other stock check simply do a random search query or other page action and amazon will not throw captcha page.

@neatchee
Copy link
Contributor

Great suggestion!
@jef This should be pretty trivial, and we could even add it to the Store definition ("catpchaDeterrentLinks") so it can be reused elsewhere as needed. Assign to me if you want? Dunno when I'll get to it but should be simple enough once I have time :D

@roachadam
Copy link
Author

FFT67f5
Here's an example of how I implemented it in my stock checker.

If bot hits bot page, it waits 5 seconds, then runs this method, waits 5 more seconds, and goes to product page and it works smoothly. @neatchee

@undecided2013
Copy link

@neatchee, in which code file did you add this? Can you do a PR for it?

@gigi2006
Copy link

@neatchee, in which code file did you add this? Can you do a PR for it?

@neatchee wrote that he needs a little time to implement it, think that was in discord. so we give him a few days :)

in any case, I am also very excited about the implementation. although I also think that it won't do much good, but let's see.

@neatchee
Copy link
Contributor

gigi is correct. I have no completed any work on this yet.

@undecided2013
Copy link

gigi is correct. I have no completed any work on this yet.

Maybe I can do it, I was looking at the source code, would you add it at below?

async function lookupCardInStock(
if (store.labels.captcha) {
if (await pageIncludesLabels(page, store.labels.captcha, baseOptions)) {
logger.warn(Print.captcha(link, store, true));
await delay(getSleepTime(store));
return false;
}
}

@neatchee
Copy link
Contributor

neatchee commented Dec 29, 2020 via email

@jef jef closed this as completed in #1542 Jan 17, 2021
jef pushed a commit that referenced this issue Jan 17, 2021
…1542)

Fixes #1504

When querying a store, if `deterrentLinks` has been defined, pick one at random and navigate there then wait 3 seconds. This should help reduce the likelihood of being sent to a captcha on subsequent page loads from the same store.
@alexpatcas
Copy link

This has not been fixed.

Getting CAPTCHA error the second run through on Amazon

@neatchee
Copy link
Contributor

neatchee commented Feb 10, 2021 via email

erwinc1 pushed a commit to erwinc1/streetmerchant that referenced this issue Mar 31, 2021
…ef#1542)

Fixes jef#1504

When querying a store, if `deterrentLinks` has been defined, pick one at random and navigate there then wait 3 seconds. This should help reduce the likelihood of being sent to a captcha on subsequent page loads from the same store.
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 a pull request may close this issue.

5 participants