霜龍 2021-06-07 18:53 采纳率: 16.7%
浏览 53

python使用selenium进行模拟登录时无法进入登录后的界面

爬取需要登录信息的网站是,使用selenium进行模拟登录,在输入完手机验证码后,网站跳转到输入登录信息之前的界面。求怎么办

    driver=webdriver.Chrome()

    driver.get('https://www.xingtu.cn/ad/creator/index')

    time.sleep(2)

    botton1=driver.find_element_by_class_name('id-item-container')

    botton1.click()

    time.sleep(2)

    botton2=driver.find_element_by_class_name('mobile')

    botton2.click()

    time.sleep(2)

    phone_number_place=driver.find_element_by_name('mobile')

    phone_number_place.send_keys('17612057003')

    password_place=driver.find_element_by_name('mobilecaptcha')

    botton3=driver.find_element_by_class_name('account-center-code-captcha')

    botton3.click()

    password=input('输入你的验证码')

    password_place.send_keys(password)

    botton4=driver.find_element_by_class_name('account-center-action-button')

    botton4.click()

    time.sleep(10)

 

  • 写回答

2条回答 默认 最新

  • 有问必答小助手 2021-06-09 23:24
    关注

    你好,我是有问必答小助手,非常抱歉,本次您提出的有问必答问题,技术专家团超时未为您做出解答

    本次提问扣除的有问必答次数,已经为您补发到账户,我们后续会持续优化,扩大我们的服务范围,为您带来更好地服务。

    评论

报告相同问题?

悬赏问题

  • ¥15 phython如何实现以下功能?查找同一用户名的消费金额合并—
  • ¥15 孟德尔随机化怎样画共定位分析图
  • ¥18 模拟电路问题解答有偿速度
  • ¥15 CST仿真别人的模型结果仿真结果S参数完全不对
  • ¥15 误删注册表文件致win10无法开启
  • ¥15 请问在阿里云服务器中怎么利用数据库制作网站
  • ¥60 ESP32怎么烧录自启动程序
  • ¥50 html2canvas超出滚动条不显示
  • ¥15 java业务性能问题求解(sql,业务设计相关)
  • ¥15 52810 尾椎c三个a 写蓝牙地址