ad-m / ad-m/python-anticaptcha

Selenium not submitting form with anticaptcha

Đang mở
#47 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
selenium-callback
Ngôn ngữ chính
Python
Star
230
Fork
53
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

@ad-m
I really tried hard using your code with selenium and chrome.
I want to login on https://services.aig.co.il/PersonalServices/#/login;url=%2Fhome

when I'm trying to login after some attempts there is Recaptcha and I have API_KEY and SITE_KEY. I got a token using website_url and site_key. but still, a successful login is not working.

```
api_key = "**********************"
client = AnticaptchaClient(api_key)

def get_token(website_url, site_key, invisible):
task = NoCaptchaTaskProxylessTask(
website_url=website_url,
website_key=site_key,
is_invisible=invisible
)
job = client.createTask(task)
job.join()
return job.get_solution_response()
```
I got token succesfull but I don't know what is not woking when i'm trying to submit form.

```
site_key = "6LcJ8QgUAAAAAB_VRlbua73AhNAp7b6AVLw-cORX"
__SITE_HOME_PAGE_FOR_CRAWLING = 'https://services.aig.co.il/PersonalServices/#/login;url=%2Fhome'
print("Found site-key", site_key)
invisible_captcha = False
token = get_token(__SITE_HOME_PAGE_FOR_CRAWLING, site_key, invisible_captcha)
print("Found token", token)
print("Received challenge-response")

# Inject response in webpage
current_user_driver.execute_script('document.getElementById("g-recaptcha-response").innerHTML = "%s"' % token)

# submit form
login_form = WebDriverWait(current_user_driver, 10).until(
EC.presence_of_element_located((By.CLASS_NAME, "login__form")))
submit_button = WebDriverWait(login_form, 10).until(
EC.element_to_be_clickable((By.CLASS_NAME, "login__form__button")))
submit_button.click()
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.