IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Réseau/Web Python Discussion :

Impossible de trouver un element


Sujet :

Réseau/Web Python

  1. #1
    Nouveau Candidat au Club
    Homme Profil pro
    Étudiant
    Inscrit en
    Août 2020
    Messages
    1
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Calvados (Basse Normandie)

    Informations professionnelles :
    Activité : Étudiant
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2020
    Messages : 1
    Points : 1
    Points
    1
    Par défaut Impossible de trouver un element
    Bonjour a tous,
    J'ai commencé a coder en python avec selenium un bot pour générer des comptes outlook, hors arriver a l’étape du captcha, j'utilise 2captcha qui me renvoie correctement le captcha, mais je ne trouve pas l’élément input ou je dois rentrer le 2 captcha, pouvez-vous m'aider ?
    voila mon code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    import urllib
    from selenium import webdriver
     
    from webdriver_manager.chrome import ChromeDriverManager
     
    driver = webdriver.Chrome(ChromeDriverManager().install())
     
    driver.get("https://signup.live.com/signup?lcid=1033&wa=wsignin1.0&rpsnv=13&ct=1596501962&rver=7.0.6737.0&wp=MBI_SSL&wreply=https%3a%2f%2foutlook.live.com%2fowa%2f%3fnlp%3d1%26signup%3d1%26RpsCsrfState%3d4bdefd68-1f14-c815-0b53-9e9b0025d7e9&id=292841&CBCXT=out&lw=1&fl=dob%2cflname%2cwld&cobrandid=90015&lic=1&uaid=582cd9bd788b401993c84ea59ae231ca")
     
     
     
    mail1='Bontoqzeugrp'
     
     
     
    import time
    mail = driver.find_element_by_name('MemberName')
    time.sleep(0.5)
    mail.send_keys(mail1)
    time.sleep(1)
    next = driver.find_element_by_id('iSignupAction').click()
     
    time.sleep(1)
    password = driver.find_element_by_id('PasswordInput')
     
    password.send_keys('JIHGE3dfuq@')
    time.sleep(0.5)
    next = driver.find_element_by_id('iSignupAction').click()
    time.sleep(0.5)
    name = driver.find_element_by_id('FirstName')
    name.send_keys('leo')
    time.sleep(0.5)
    lastName = driver.find_element_by_id('LastName')
    lastName.send_keys('leve')
    time.sleep(0.5)
    next = driver.find_element_by_id('iSignupAction').click()
    time.sleep(0.5)
     
    from selenium.webdriver.support.ui import Select
    select = Select(driver.find_element_by_id('Country'))
    select.select_by_value('DE')
    time.sleep(1)
     
    from selenium.webdriver.support.ui import Select
    day = Select(driver.find_element_by_name('BirthDay'))
    day.select_by_value('2')
     
    from selenium.webdriver.support.ui import Select
    month = Select(driver.find_element_by_name('BirthMonth'))
    month.select_by_value('2')
     
    from selenium.webdriver.support.ui import Select
    year = Select(driver.find_element_by_name('BirthYear'))
    year.select_by_value('2002')
     
    next = driver.find_element_by_id('iSignupAction').click()
     
    time.sleep(1)
     
    captcha = driver.find_element_by_id('wlspispHipInstructionContainer')
    time.sleep(2)
     
     
    src = img.get_attribute('src')
    urllib.urlretrieve(src, "captcha.png")
     
     
    from twocaptchaapi import TwoCaptchaApi
    api = TwoCaptchaApi('API_KEY')
     
    with open('captcha.png', 'rb') as captcha_file:
        captcha = api.solve(captcha_file)
     
    print(captcha.await_result())
     
    captcha.send_keys(captcha.await_result())
     
     
    next = driver.find_element_by_id('iSignupAction').click()
    Merci de votre aide !

  2. #2
    Membre régulier Avatar de copyleft28
    Homme Profil pro
    Lycéen
    Inscrit en
    Février 2020
    Messages
    65
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Seine Maritime (Haute Normandie)

    Informations professionnelles :
    Activité : Lycéen

    Informations forums :
    Inscription : Février 2020
    Messages : 65
    Points : 75
    Points
    75
    Par défaut
    Bonjour, je ne suis pas sûr que générer des comptes Outlook automatiquement sans l'accord de Microsoft soit très très légal, et s'il y a un Captcha, c'est pour empêcher les robots de passer, donc je ne pense pas que beaucoup de monde va vous répondre

Discussions similaires

  1. Trouver un element sélectionné
    Par Anduriel dans le forum Général JavaScript
    Réponses: 8
    Dernier message: 02/08/2008, 04h40
  2. Réponses: 5
    Dernier message: 05/06/2008, 22h43
  3. Impossible de trouver la procédure stockée
    Par yann47 dans le forum MS SQL Server
    Réponses: 2
    Dernier message: 11/02/2005, 22h47
  4. [Plugin][MYECLIPSE]Impossible de trouver une JVM
    Par tolsam dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 08/08/2004, 20h46
  5. Impossible de trouver la procédure stockée
    Par engi dans le forum MS SQL Server
    Réponses: 11
    Dernier message: 12/05/2004, 16h28

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo