素材准备下载
从网上找到一个简单的验证码的地址
# -*- coding:utf-8 -*-
import requests
import os
import time
os.makedirs('./image/', exist_ok=True)
IMAGE_URL = "xxxxxxxxxxxxxxxx"
for i in range(10,1000):
def request_download():
r = requests.get(IMAGE_URL)
with open('./image/'+str(i)+'.png', 'wb') as f:
f.write(r.content)
try:
request_download()
print('download img')
# im = Image.open('./image/img.png')
# im.show()
except:
print('download img error!')
time.sleep(1)
网友评论