首页 > 解决方案 > 需要帮助使用 selenium python 和 2captcha 创建 Outlook 帐户 - Funcaptcha

问题描述

卡在验证码上 解决正在尝试使用一个名为 unicode 的项目,如果有人可以在这部分帮助我,将不胜感激使用 2Captcha

除了其他一切都在为我创建帐户之外,这只是一个我根本无法弄清楚的小问题

from selenium import webdriver
import time
from selenium.webdriver.common.keys import Keys
from selenium import webdriver
from selenium.webdriver.support.select import Select
from twocaptcha import TwoCaptcha
from unicaps import CaptchaSolver,CaptchaSolvingService

#import email list
email_list = []
emails = open('email-creation-list.txt', 'r')
endOfFile = False
while endOfFile == False:
    temp = emails.readline().strip()
    if not temp:
        endOfFile = True
    else:
        email_list.append(temp)
print((email_list))
cycle = 0

x = 1
while x == 1:
    #main
    GChrome = webdriver.Chrome()
    GChrome.get('https://signup.live.com/signup')
    time.sleep(4)
    GChrome.find_element_by_link_text("Get a new email address").click()
    time.sleep(3)
    box_login = GChrome.find_element_by_xpath('//*[@id="MemberName"]')
    box_login.click()
    box_login.send_keys(email_list[cycle])
    time.sleep(3)
    box_login = GChrome.find_element_by_xpath('//*[@id="MemberName"]').send_keys(Keys.ENTER)
    time.sleep(3)
    box_password = GChrome.find_element_by_xpath('//*[@id="PasswordInput"]')
    box_password.click()
    box_password.send_keys('kPb8nzbckquxSa')
    box_password = GChrome.find_element_by_xpath('//*[@id="PasswordInput"]').send_keys(Keys.ENTER)
    time.sleep(2)
    firstname = GChrome.find_element_by_xpath('//*[@id="FirstName"]')
    firstname.click()
    firstname.send_keys('John')
    lastname = GChrome.find_element_by_xpath('//*[@id="LastName"]')
    lastname.click()
    lastname.send_keys('Doe')
    lastname = GChrome.find_element_by_xpath('//*[@id="LastName"]').send_keys(Keys.ENTER)
    time.sleep(2)

    s = Select(GChrome.find_element_by_xpath('//*[@id="BirthDay"]'))
    # select by option index
    s.select_by_index(4)
    time.sleep(2)

    s2 = Select(GChrome.find_element_by_xpath('//*[@id="BirthMonth"]'))
    s2.select_by_index(4)

    month = GChrome.find_element_by_xpath('//*[@id="BirthYear"]')
    month.click()
    month.send_keys('1997')
    month = GChrome.find_element_by_xpath('//*[@id="BirthYear"]').send_keys(Keys.ENTER)
    time.sleep(2)


#unicaps
    solver = CaptchaSolver(CaptchaSolvingService.TWOCAPTCHA, api_key='')
    solver.get_balance()
    solver = solver.solve_funcaptcha('B7D8911C-5CC8-A9A3-35B0-554ACEE604DA','https://signup.live.com/signup')


   # solved = solver.solve_funcaptcha(
   # public_key='B7D8911C-5CC8-A9A3-35B0-554ACEE604DA',
    #page_url='https://signup.live.com/signup'
    #)

    time.sleep(10)

其他信息

标签: pythonselenium2captcha

解决方案


推荐阅读