merge #8344: [wikimedia] fix name & extension of files without an extension
This commit is contained in:
@@ -74,9 +74,7 @@ class WikimediaExtractor(BaseExtractor):
|
||||
m["name"]: m["value"]
|
||||
for m in image["commonmetadata"] or ()}
|
||||
|
||||
filename = image["canonicaltitle"]
|
||||
image["filename"], _, image["extension"] = \
|
||||
filename.partition(":")[2].rpartition(".")
|
||||
text.nameext_from_url(image["canonicaltitle"].partition(":")[2], image)
|
||||
image["date"] = text.parse_datetime(
|
||||
image["timestamp"], "%Y-%m-%dT%H:%M:%SZ")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user