This commit is contained in:
j 2017-03-20 02:30:51 +01:00
parent 65ff5d5e32
commit 3fcaaf9081

View file

@ -40,6 +40,8 @@ for i in range(10):
shutil.copyfileobj(r.raw, fd)
ox.avinfo('%s.tmp' % name)['duration']
shutil.move('%s.tmp' % name, name)
mtime = time.mktime(datetime.datetime.strptime(r.headers.get("Last-Modified"), "%a, %d %b %Y %X GMT").timetuple())
os.utime(name, (mtime, mtime))
ox.avinfo(name)['duration']
except:
print(url, 'failed')