python Image open读取网络图片本地显示 爬虫必备
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import requests
from PIL import Image
from io import BytesIO
response = requests.get('https://static.geetest.com/pictures/gt/5629ed821/5629ed821.webp')
response = response.content
BytesIOObj = BytesIO()
BytesIOObj.write(response)
img = Image.open(BytesIOObj)
img.show()
原文链接:https://blog.csdn.net/qq_38691608/article/details/87535766

浙公网安备 33010602011771号