Imgur API returns image upload time. It can be used as the last modified time of the file. You can add an option like --timestamps for it.
To do this, you need to add a line to this. Where datetime is image['datetime'] located in download_account_images, passed to parse_id.
with open(os.path.join(path, filename), 'wb') as image_file:
req.raw.decode_content = True
shutil.copyfileobj(req.raw, image_file)
os.utime(image_file.name, (datetime, datetime))
Imgur API returns image upload time. It can be used as the last modified time of the file. You can add an option like
--timestamps
for it. To do this, you need to add a line to this. Wheredatetime
isimage['datetime']
located indownload_account_images
, passed toparse_id
.