From d2b3eb6adbb41afc1cdde6b293b968450cadb0ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sun, 7 Dec 2025 17:40:08 +0100 Subject: [PATCH] [chevereto] extract 'album_id' & 'album_slug' metadata (#8604) --- gallery_dl/extractor/chevereto.py | 16 ++++++++++++---- test/results/imagepond.py | 2 ++ test/results/jpgfish.py | 9 +++++++-- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/gallery_dl/extractor/chevereto.py b/gallery_dl/extractor/chevereto.py index 45d9471b..5b74ab9f 100644 --- a/gallery_dl/extractor/chevereto.py +++ b/gallery_dl/extractor/chevereto.py @@ -74,15 +74,18 @@ class CheveretoImageExtractor(CheveretoExtractor): url, b"seltilovessimpcity@simpcityhatesscrapers", fromhex=True) + album_url, _, album_name = extr("Added to ").rpartition(">") file = { "id" : self.path.rpartition("/")[2].rpartition(".")[2], "url" : url, - "album": text.remove_html(extr( - "Added to ").rpartition(">")[2]), + "album": text.remove_html(album_name), "date" : self.parse_datetime_iso(extr('', "—"), - "album": text.remove_html(extr( - "Added to ").rpartition(">")[2]), + "album" : extr( + "Added to "), "date" : self.parse_datetime_iso(extr('") + file["album"] = text.remove_html(album_name) + file["album_slug"], _, file["album_id"] = text.rextr( + album_url, "/", '"').rpartition(".") + try: min, _, sec = file["duration"].partition(":") file["duration"] = int(min) * 60 + int(sec) diff --git a/test/results/imagepond.py b/test/results/imagepond.py index 6effbae4..65101e38 100644 --- a/test/results/imagepond.py +++ b/test/results/imagepond.py @@ -37,6 +37,8 @@ __tests__ = ( "#results" : "https://media.imagepond.net/media/100042393993a6bfa75fc505e9.mp4", "album" : "", + "album_id" : "", + "album_slug": "", "date" : "dt:2025-08-29 18:01:20", "duration" : 7, "extension": "mp4", diff --git a/test/results/jpgfish.py b/test/results/jpgfish.py index f0955f7a..fd36366c 100644 --- a/test/results/jpgfish.py +++ b/test/results/jpgfish.py @@ -16,6 +16,8 @@ __tests__ = ( "#sha1_content": "098e5e9b17ad634358426e0ffd1c93871474d13c", "album" : "", + "album_id" : "", + "album_slug": "", "date" : "dt:2022-06-05 03:24:25", "extension": "jpg", "filename" : "funnymeme", @@ -62,8 +64,11 @@ __tests__ = ( "#class" : chevereto.CheveretoImageExtractor, "#results" : "https://simp2.selti-delivery.ru/hannahowo_00457.jpg", - "album": "401-500", - "date" : "dt:2022-03-23 13:50:52", + "album" : "401-500", + "album_id" : "atYaG", + "album_slug": "401-500", + "date" : "dt:2022-03-23 13:50:52", + "id" : "auCruA", }, {