[chevereto] fix user URLs starting with 'a' (#8149)

This commit is contained in:
Mike Fährmann
2025-08-30 21:20:32 +02:00
parent 94c72a71fa
commit 38ec62691f
2 changed files with 9 additions and 2 deletions

View File

@@ -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):

View File

@@ -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,
},
)