0

I am trying to bypass the Hcaptcha while I am scrapping a website, I found the service anti-captcha.com however to request a worker to solve the captcha I need a parameter called site_key. My question where can I find that value?

  api_key = '....'
 site_key = '...'  # grab from site
 
 client = AnticaptchaClient(api_key)
 task = NoCaptchaTaskProxylessTask(url, site_key)
 job = client.createTask(task)
 print("Waiting to solution by Anticaptcha workers")
 job.join()
 # Receive response
 response = job.get_solution_response()
 print("Received solution", response)
 
 # Inject response in webpage
 driver.execute_script('document.getElementById("g-recaptcha-response").innerHTML > = "%s"' % response)
 
 # Wait a moment to execute the script (just in case).
 time.sleep(1)
 
 # Press submit button
 driver.find_element_by_xpath('//button[@type="submit" and @class="btn-std"]').click()

0 Answers0