[dl:http] fix setting 'mtime' per file (#7529)
introduce '_http_lastmodified' meta field
This commit is contained in:
@@ -322,7 +322,10 @@ class HttpDownloader(DownloaderBase):
|
||||
|
||||
self.downloading = False
|
||||
if self.mtime:
|
||||
kwdict.setdefault("_mtime", response.headers.get("Last-Modified"))
|
||||
if "_http_lastmodified" in kwdict:
|
||||
kwdict["_mtime"] = kwdict["_http_lastmodified"]
|
||||
else:
|
||||
kwdict["_mtime"] = response.headers.get("Last-Modified")
|
||||
else:
|
||||
kwdict["_mtime"] = None
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ class AryionExtractor(Extractor):
|
||||
"<p>", "</p>"), "", "")),
|
||||
"filename" : fname,
|
||||
"extension": ext,
|
||||
"_mtime" : lmod,
|
||||
"_http_lastmodified": lmod,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user