ad-m / ad-m/python-anticaptcha
Submit form with selenium
- 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 use selenium with chromedriver.
I would like to login here: [https://listen.tidal.com/login](url)
Actually I get a resolve token from the anti-captcha service and I can insert it into the website, but I can´t submit the form.
```
def loginTidal(driver, counter):
global accounts
tempDetails = accounts[counter].split(':')
# driver.get("http://tidal.com/login")
driver.get("https://tidal.com/")
driver.implicitly_wait(5)
driver.find_element_by_class_name(
"btn-link.btn-medium.font-weight-normal.hidden-sm-max"
).click()
time.sleep(2)
WebDriverWait(driver, 120).until(
EC.presence_of_element_located(
(By.CLASS_NAME, "form-input.client-input"))).send_keys(tempDetails[0])
time.sleep(3)
url=driver.current_url
client = AnticaptchaClient(api_key)
task = NoCaptchaTaskProxylessTask(url, site_key)
job = client.createTask(task)
job.join()
response = job.get_solution_response()
print("Received solution", response)
driver.execute_script("document.getElementById('g-recaptcha-response').innerHTML='{}';".format(response))
time.sleep(2)
driver.find_element_by_xpath("/html/body/div[1]/div[2]/div[3]/div/div/div/div[1]/div[1]/div/form").submit()
time.sleep(2)
password=WebDriverWait(driver, 120).until(
EC.presence_of_element_located(
(By.ID, "password"))).send_keys(tempDetails[1])
WebDriverWait(driver, 120).until(
EC.presence_of_element_located(
(By.CLASS_NAME, "position-relative.fullwidth.margin-bottom-1.btn-success.btn-client-primary"))).click()
```
The problem is that a image challenge occur after I inserted an email in the form.
Do you have an idea to solve my problem?
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á.