1

我在废弃网站时试图绕过 Hcaptcha,但我找到了 anti-captcha.com 服务,但是要请求工作人员解决验证码,我需要一个名为 site_key 的参数。我的问题在哪里可以找到该值?

  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()
4

0 回答 0