You make a request, get the data from the headers, and request again with the correct headers. As for rendering the captcha it’s difficult. if I remember correctly, there is a library called funcaptcha which will render the link for your challenge based on the blob data and public key, then you have to put the captcha in an iframe, track results, and on completion it will return a valid token More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.