with open('image.jpg', 'rb') as fh:
    tags = EXIF.process_file(fh, stop_tag='EXIF DateTimeOriginal')
dateTaken = tags['EXIF DateTimeOriginal']
return dateTaken
Get date and time when photo was taken from EXIF data using PIL