找到验证码输入框,并等待输入验证码

while True: # 一直循环,直到验证码输入完成 try: element = wd.find_element(By.ID, 'captcha') # 找到验证码输入框 captcha = input('请输入验证码:') # 等待手动输入验证码 element.clear() # 清除内容 element.send_keys(captcha) # 输入验证码 time.sleep(1) break # 输入完成,退出循环 except: time.sleep(1) # 等待1秒再次尝试找到验证码输入框


原文地址: https://www.cveoy.top/t/topic/fF4n 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录