python 将验证码保存到本地 读取 写入

 1 #验证码
 2 #读取验证码网址、打开本地路径、写入、输入验证码
 3 downpicture = urllib.request.urlopen(SecretCodeUrl).read()
 4 local = open(address, 'wb')
 5 local.write(downpicture)
 6 local.close()
 7 print(u"请从桌面寻找你的验证码")
 8 print (u"请输入验证码:")
 9 SecretCode = input()
10 driver.find_element_by_id('txtSecretCode').send_keys(SecretCode)

 

posted @ 2017-11-25 15:22  流云不羁  阅读(716)  评论(0编辑  收藏  举报