把网络图片保存到本地
from io import BytesIO
from PIL import Image # 安装pip install Pillow
import requests
import uuid
url = item['stimage'] # 网络图片地扯
response = requests.get(url)
image = Image.open(BytesIO(response.content))
filename = uuid.uuid1()
img_save_path = '{}/{}.{}'.format('images',filename,'jpg') # 保存的路径,记得在当前运行文件目录下创建一个images文件夹
image.save(img_save_path)