I have a program to extract transaction logs from my Bank website for the ERP system. Since my Bank doesn't provide any Web Service for this kind of data, I have to scrape it. This program is not intending to bypass captcha. Users have to input the captcha/bank account for the login part. It had worked until my Bank changed to Google Invisible reCaptcha. Since then I couldn't get the correct reCaptcha-token.
These are the steps my program process using HTTP Request: (Java, HtmlUnit)
- Get login page
- Get Captcha Image and show it to the user to resolve it.
- Get reCaptcha-token from this link: https://www.google.com/recaptcha/api2/anchor?ar=1&k= ...
- Post (bankaccount id, bankaccount pw, resolved captcha image, reCaptcha-token....)
So how to get the correct reCaptcha-token based on sitekey and siteurl?