From 38ec62691f2a3c3e7c6ec6f313c80bced3a8a0cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Sat, 30 Aug 2025 21:20:32 +0200 Subject: [PATCH] [chevereto] fix user URLs starting with 'a' (#8149) --- gallery_dl/extractor/chevereto.py | 4 ++-- test/results/imagepond.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gallery_dl/extractor/chevereto.py b/gallery_dl/extractor/chevereto.py index 1da7e232..db67a9d0 100644 --- a/gallery_dl/extractor/chevereto.py +++ b/gallery_dl/extractor/chevereto.py @@ -15,7 +15,7 @@ from .. import text, util class CheveretoExtractor(BaseExtractor): """Base class for chevereto extractors""" basecategory = "chevereto" - directory_fmt = ("{category}", "{user}", "{album}",) + directory_fmt = ("{category}", "{user}", "{album}") archive_fmt = "{id}" def _init(self): @@ -111,7 +111,7 @@ class CheveretoAlbumExtractor(CheveretoExtractor): class CheveretoUserExtractor(CheveretoExtractor): """Extractor for chevereto Users""" subcategory = "user" - pattern = BASE_PATTERN + r"(/(?!img|image|a(?:lbum)?)[^/?#]+(?:/albums)?)" + pattern = BASE_PATTERN + r"(/[^/?#]+(?:/albums)?)" example = "https://jpg2.su/USER" def items(self): diff --git a/test/results/imagepond.py b/test/results/imagepond.py index 4c615368..4d994b2a 100644 --- a/test/results/imagepond.py +++ b/test/results/imagepond.py @@ -39,4 +39,11 @@ __tests__ = ( "#count" : 30, }, +{ + "#url" : "https://imagepond.net/ap000", + "#comment" : "username starting with 'a' (#8149)", + "#category": ("chevereto", "imagepond", "user"), + "#class" : chevereto.CheveretoUserExtractor, +}, + )