Pythonwill 2021-10-03 15:28 采纳率: 66.7%
浏览 48
已结题

网易自动注册输手机号的地方找不到

代码


import time
from selenium import webdriver
import sys, os
sys.path.append(os.getcwd())
import random
import string
def do():
    a1 = random.choice(string.ascii_letters)
    a2 = random.choice(string.ascii_letters)
    a3 = random.choice(string.ascii_letters)
    a4 = random.choice(string.ascii_letters)
    a5 = random.choice(string.ascii_letters)
    a6 = random.choice(string.ascii_letters)
    a7 = random.choice(string.ascii_letters)
    b1 = random.randint(0, 9)
    b2 = random.randint(0, 9)
    b3 = random.randint(0, 9)
    b1 = str(b1)
    b2 = str(b2)
    b3 = str(b3)
    aname = (a1 + a2 + a3 + a4 + a5 + a6 + a7 + b1 + b2 + b3)
    print(aname + '@163.com')
    with open('C:/Users/THINK/Desktop/完成的账号.txt', 'a', encoding='utf-8') as asd:
        asd.write(aname + '@163.com—')

    driver=webdriver.Chrome('C:/Program Files/Google/Chrome/Application/chromedriver.exe')# 选择Chrome浏览器
    driver.get('https://zc.reg.163.com/regInitialized?pkid=VEyRTVF&pkht=mc.163.com&toUrlFromHerf=https%3A%2F%2Fservice.mkey.163.com%2Fmpay%2Fregister2%2Fcallback%3Fgv%3D1.6.33.20954%26app_mode%3D2%26game_id%3Daecfrxodyqaaaajp-g-x19%26cv%3Dc3.4.0%26app_channel%3Dnetease%26device_id%3Damawcpyaaekukt4p-d&pd=x19_client#/stepsuc') # 打开网站


    time.sleep(1)


    #driver.find_element_by_link_text('账户登录').click() # 点击“账户登录”
    driver.find_element_by_class_name('bview-input.bview-input-with-append').click()
    driver.find_element_by_class_name('bview-input.bview-input-with-append').send_keys(aname + '@163.com')


    b1 = random.choice(string.ascii_letters)
    b2 = random.choice(string.ascii_letters)
    b3 = random.choice(string.ascii_letters)
    b4 = random.choice(string.ascii_letters)
    b5 = random.choice(string.ascii_letters)
    b6 = random.choice(string.ascii_letters)
    b7 = random.choice(string.ascii_letters)
    ab1 = random.randint(2, 9)
    ab2 = random.randint(2, 9)
    ab3 = random.randint(2, 9)
    ab1 = str(ab1)
    ab2 = str(ab2)
    ab3 = str(ab3)
    print(b1 + b2 + b3 + b4 + b5 + b6 + b7 + ab1 + ab2 + ab3)
    with open('C:/Users/THINK/Desktop/完成的账号.txt', 'a', encoding='utf-8') as asd:
        asd.write((b1 + b2 + b3 + b4 + b5 + b6 + b7 + ab1 + ab2 + ab3) + '\n')


    driver.find_element_by_class_name('bview-input.bview-input-with-append.bview-input-with-pwd').click()
    driver.find_element_by_class_name('bview-input.bview-input-with-append.bview-input-with-pwd').send_keys(b1 + b2 + b3 + b4 + b5 + b6 + b7 + ab1 + ab2 + ab3)


    driver.find_element_by_class_name('m-agree').click()


    driver.find_element_by_class_name('step0-btn.bview-button.bview-button-size.bview-button-primary').click()
    #'bview-input-wrapper '
    time.sleep(15)
    #driver.implicitly_wait(30)
    handles = driver.window_handles
    print(handles)
    driver.switch_to.window(handles[-1])
    driver.find_element_by_class_name('bview-input.bview-input-with-append').click()#这里
#                                                                       这里
    driver.find_element_by_class_name('bview-input.bview-input-with-append').send_keys('手机号')#这里
    driver.find_element_by_class_name('reg-button.bview-button.bview-button-size.bview-button-primary').click()


    time.sleep(8890)
    driver.close()
do()

报错内容


Traceback (most recent call last):
  File "C:/Users/THINK/Desktop/新建文件夹 (2)/12312315.py", line 77, in <module>
    do()
  File "C:/Users/THINK/Desktop/新建文件夹 (2)/12312315.py", line 70, in do
    driver.find_element_by_class_name('bview-input.bview-input-with-append').click()
  File "C:\Users\THINK\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click
    self._execute(Command.CLICK_ELEMENT)
  File "C:\Users\THINK\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute
    return self._parent.execute(command, params)
  File "C:\Users\THINK\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\THINK\AppData\Local\Programs\Python\Python36-32\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element <input placeholder="请输入邮箱地址" autocomplete="off" type="text" class="bview-input bview-input-with-append"> is not clickable at point (464, 282). Other element would receive the click: <div class="yidun_popup__mask" style="opacity: 0.3;"></div>
  (Session info: chrome=94.0.4606.71)

img

img


问一下代码里的输密码find class 应该写哪个,求答

  • 写回答

1条回答 默认 最新

  • Pythonwill 2021-10-03 15:28
    关注

    img

    评论

报告相同问题?

问题事件

  • 系统已结题 10月11日
  • 提问应符合社区要求 10月3日
  • 创建了问题 10月3日

悬赏问题

  • ¥15 高价求中通快递查询接口
  • ¥15 解决一个加好友限制问题 或者有好的方案
  • ¥15 关于#java#的问题,请各位专家解答!
  • ¥15 急matlab编程仿真二阶震荡系统
  • ¥20 TEC-9的数据通路实验
  • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
  • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
  • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
  • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型
  • ¥15 如何实现H5在QQ平台上的二次分享卡片效果?