[imagebam] fix 'filename' & 'extension' for names without ext (#8476)

This commit is contained in:
Mike Fährmann
2025-10-29 09:13:02 +01:00
parent 5ab0c6051b
commit f692380950
2 changed files with 14 additions and 4 deletions

View File

@@ -30,12 +30,10 @@ class ImagebamExtractor(Extractor):
url, pos = text.extract(page, '<img src="https://images', '"')
filename = text.unescape(text.extract(page, 'alt="', '"', pos)[0])
data = {
return text.nameext_from_name(filename, {
"url" : "https://images" + url,
"image_key": path.rpartition("/")[2],
}
data["filename"], _, data["extension"] = filename.rpartition(".")
return data
})
class ImagebamGalleryExtractor(ImagebamExtractor):