在spider.py中:
from io import BytesIO
from PIL import Image
Class ...
def...
img_data = BytesIO(response.body)
img = Image.open(image_data)
在spider.py中:
from io import BytesIO
from PIL import Image
Class ...
def...
img_data = BytesIO(response.body)
img = Image.open(image_data)