ad-m / ad-m/python-anticaptcha

Submit form with selenium

Abierto
#68 6 comentarios 0 reacciones 0 asignados Ver en GitHub
selenium-callback
Lenguaje dominante
Python
Estrellas
230
Forks
53
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

@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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.