requests 怎么储存 目前页面验证码?
页面重新requests 验证码就不同,怎么储存 目前页面验证码?
<img id="imgVI" src="ImageCode.aspx" style="border-width:0px;" />
import requests s = requests.Session() url = 'https://so.' page_text = s.get(url) img_code_url = 'https://so.' img_data = s.get(url=img_code_url).content with open('b.jpg', 'wb') as fp: fp.write(img_data) img_code_url = 'https://so.' img_data = s.get(url=img_code_url).content with open('C.jpg', 'wb') as fp: fp.write(img_data) num = int(input('输入驗證碼:')) print(num)
[此贴子已经被作者于2022-6-25 16:40编辑过]