Python笔记 | python 获取在线图片大小

from PIL import Image
import requests
from io import BytesIO

url = 'https://pic.36krcnd.com/201906/25021629/o2sjxxvlouga2y3q!1200'
response = requests.get(url)
img = Image.open(BytesIO(response.content))

你可能感兴趣的:(Python笔记 | python 获取在线图片大小)