ad-m / ad-m/python-anticaptcha

Submit form with selenium

Aperta
#68 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub
selenium-callback
Lingua principale
Python
Stelle
230
Fork
53
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.