给图片加入详细信息返回结果KeyError: 'exif',请问有什么办法解决吗

在网站爬取每个类目里的详细图片可以正常写入,但是目录页面的缩略图不能,总是报错:

exif_dict = piexif.load(im.info["exif"])
KeyError: 'exif'

缩略图来源地址:(在评论区) 试过了多个都不行
img
网上查阅了下,说是图片本来就没有exif data,用print(im.info)看了下,好像确实缺少exif的key

{'jfif': 257, 'jfif_version': (1, 1), 'dpi': (96, 96), 'jfif_unit': 1, 'jfif_density': (96, 96), 'comment': b'CREATOR: gd-jpeg v1.0 (using IJG JPEG v80), quality = 95\n'}

有exif的图片print(im.info)结果
img
请问有什么其他办法可以写入爬取到的数据到图片详细信息里面吗?

(写这个提问的时候,一直提示格式出问题,说是有重复的字母,所以文字中和代码段的缩略图地址放在评论区了)

import requests
from PIL import Image
import piexif
import lxml
from lxml import etree
 
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.83 Safari/537.36',
    'Accept-Language':'zh-CN'
}

page_respond = requests.get(url = 'https://(在评论区)/huahui-engineering-design-and-technological-innovation-center-china-by-huahui-group-we-studio.htm',headers = headers)
page_Soup = BeautifulSoup(page_respond .content, 'lxml')
 
page_spec_label = page_Soup.findAll('span', class_= 'label-text')
page_spec_data = page_Soup.findAll('div', class_= 'spec-data')
 
key_word = []
value_word = []
 
for i in page_spec_label:
    # print(i.string)
    key_word.append(i.string)
 
for j in page_spec_data:
    s = j.find_all('a')
    if len(s)>1:
        l=';'.join([x.string for x in s])
    elif len(s)==1:
        l=s[0].string
    else:
        l=''
    value_word.append(l)
 
dict_word = dict(zip(key_word,value_word))
print(dict_word)
save_filename = 'F:/CodeWar/spider/exif/5.jpg'
im = Image.open(save_filename)
print(im.info)
exif_dict = piexif.load(im.info["exif"])
 
exif_dict["0th"][piexif.ImageIFD.Software] = dict_word['标签'].encode()
exif_dict["0th"][piexif.ImageIFD.Copyright] = dict_word['设计公司'].encode()
exif_dict["0th"][piexif.ImageIFD.XPTitle] = dict_word['位置'].encode('utf-16')    
exif_dict["0th"][piexif.ImageIFD.XPSubject] = dict_word['类型'].encode('utf-16') 
exif_dict["0th"][piexif.ImageIFD.XPKeywords] = dict_word['分类'].encode('utf-16')  
exif_dict["0th"][piexif.ImageIFD.XPComment] = dict_word['材料'].encode('utf-16')   
 
exif_bytes = piexif.dump(exif_dict)
im.save(save_filename, exif=exif_bytes)

地址:www.gooood.cn