import requests
from PIL import Image
from PIL.ExifTags import TAGS
def get_exif(fn):
ret = {}
i = Image.open(fn)
info = i._getexif()
for tag, value in info.items():
decoded = TAGS.get(tag, tag)
ret[decoded] = value
return ret
links.csv 是一个包含所有照片超链接的文件
for line in open("links.csv"):
print get_exif(requests.get(line))