PID Field: Recaptcha

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

When I press START, the program will login into Adidas.com/us ..

You can use phantom JS for that


When login is complete, the program will check if the LINK has a sitekey in the page source, if it does
then display the recaptcha box and the user will solve it and the program will use the g response to send
the add to cart request (display below).
If it DOESNT contain the sitekey, then refresh the link every 2 seconds until its found.
About the PID field in the picture: this value is for the add to cart request. If I put PID as then the path of
the request will look like
https://www.adidas.com/on/demandware.store/Sites-adidas-US-Site/en_US/CartMiniAddProduct?layer=Add+To+Bag+overlay&pid=BB4318_640&Quantity=1&g-recaptcharesponse=RECAPTCHA&masterPid= BB4318&ajax=true
and of coarse you will replace the RECAPCHA with the token after the user solves.
Request Type is weather the request we send will be HEAD or PUT. Both are exact same requests. It just
the type that you will set when the user presses START.
Status So before I press START, there is no status value. When I press START, if the program logs in
successfully then it will start checking the link immediately so the STATUS will either change to NOT
FOUND or FOUND. It will continue to say NOT FOUND until the sitekey is FOUND. When the user solves
the captcha box then the program will send the add to cart request and so if the PID is in the cart page
(https://www.adidas.com/on/demandware.store/Sites-adidas-US-Site/en_US/Cart-Show) then say
CARTED! otherwise NOT CARTED .. if it didnt cart then the user can solve the box again and the
same process will repeat. So dont remove the recaptcha box when it appears.

IMPORTANT: for the request below, you MUST MUST use the EXACT headers in the EXACT order.
HEAD/PUT
Path: https://www.adidas.com/on/demandware.store/Sites-adidas-US-Site/en_US/CartMiniAddProduct?layer=Add+To+Bag+overlay&pid=PID&Quantity=1&g-recaptcharesponse=RECAPTCHA&masterPid=PID_WITHOUT_THE_XXX&ajax=true
Headers:
Host: www.adidas.co.uk
Connection: keep-alive
Content-Length: 0
Accept: */*
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/53.0.2785.116 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie:

You might also like