·

代码可以高亮:

from os import *
from PIL import Image

PATH = r"C:\Users\Administrator\Desktop"
for root, dirs, files in walk(PATH):
    for f in files:
        if path.splitext(f)[1] == ".webp":
            img = Image.open(f)
            img.load()
            img.save(f[0:-5] + ".jpg")
            remove(f)

下面的选择框选择 python 就可以