# -*- coding: utf-8 -*-
# @Time : 2022/1/14 9:35
# @Author : Cocktail_py
from PIL import Image
import imghdr
filename = 'xxx.jpg'
# 查看图片是什么类型
print(imghdr.what(filename))
# 转换成能打开的类型
image = Image.open(filename)
image = image.convert("RGB")
image.save(filename, "JPEG")
Python爬取下来的图片不可见