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 expecting capcha #15

Open
mfraser opened this issue Jun 12, 2021 · 10 comments
Open

Amazon expecting capcha #15

mfraser opened this issue Jun 12, 2021 · 10 comments

Comments

@mfraser
Copy link

mfraser commented Jun 12, 2021

Just tried to run price-alert and I was getting the

Didn't find the 'price' element, trying again later

Now it looks like Amazon is wanting me to enter a Captcha.

Enter the characters you see below

Sorry, we just need to make sure you're not a robot. For best results, please make sure your browser is accepting cookies.

        <div class="a-section">

            <div class="a-box a-color-offset-background">
                <div class="a-box-inner a-padding-extra-large">

                    <form method="get" action="/errors/validateCaptcha" name="">
                        <input type=hidden name="amzn" value="0bg/HZ5wHJqUobhCg6n1/w==" /><input type=hidden name="amzn-r" value="&#047;dp&#047;B07KKBCXLY" />
                        <div class="a-row a-spacing-large">
                            <div class="a-box">
                                <div class="a-box-inner">
                                    <h4>Type the characters you see in this image:</h4>
                                    <!-- For automated access to price change or offer listing change events,
                                         please refer to the MWS Subscription API:
                                         https://developer.amazonservices.co.uk/gp/mws/api.html/276-5247872-0590350?ie=UTF8&section=subscriptions&group=subscriptions&version=latest
@eyalzek
Copy link
Owner

eyalzek commented Jun 17, 2021

Can you share the config you're using (minus the email part) ?

@mfraser
Copy link
Author

mfraser commented Jun 17, 2021

{
"email": {
},
"base_url": "https://www.amazon.co.uk/dp/",
"xpath_selector": "//*[@id="priceblock_ourprice"]",
"items": [
["B07VS31PLC", 50],
["B0832VWWD1", 80],
["B07KKBCXLY", 27]
]
}

@eyalzek
Copy link
Owner

eyalzek commented Jun 17, 2021

It works for me. Which country are you connecting from? Are you using a VPN?

@mfraser
Copy link
Author

mfraser commented Jun 17, 2021

I am in the UK and not on a VPN.

All I get is "Didn't find the 'price' element, trying again later"

@eyalzek
Copy link
Owner

eyalzek commented Jun 17, 2021

If you're trying to go to one of these pages in a private windows (incognito), e.g:
https://www.amazon.co.uk/dp/B07VS31PLC
https://www.amazon.co.uk/dp/B0832VWWD1
https://www.amazon.co.uk/dp/B07KKBCXLY

does it look ok or is it prompting for captcha?

@mfraser
Copy link
Author

mfraser commented Jun 17, 2021

It is only asking to accept cookies.

@eyalzek
Copy link
Owner

eyalzek commented Jun 17, 2021

You can try adding some more headers like here: https://stackoverflow.com/a/63675657

Other than that there's not much I can do if I can't reproduce it myself.. Did it work for a while and then stop, or were you seeing the same behavior since the first request?

@VasiRoum
Copy link

VasiRoum commented Jul 7, 2021

hello. 1st of all, respect.
2nd, in another site i am trying price-alert it has only class,not id before the price section and i cannot load this in the json file. do u suggest any solutions?

@eyalzek
Copy link
Owner

eyalzek commented Jul 8, 2021

Which site? The config just holds the XPath selector to the element, it should work with a class also. You can get the XPath for the element when inspecting it, then right click and copy as XPath.

@VasiRoum
Copy link

VasiRoum commented Jul 8, 2021

Zara. has no id. And even if i right click and get the Xpath, still doesn't work :(
Update: All g man, i am simply idiot! thanks for the response and nice work guys!

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

No branches or pull requests

3 participants