[chevereto] fix user URLs starting with 'a' (#8149)
This commit is contained in:
@@ -15,7 +15,7 @@ from .. import text, util
|
|||||||
class CheveretoExtractor(BaseExtractor):
|
class CheveretoExtractor(BaseExtractor):
|
||||||
"""Base class for chevereto extractors"""
|
"""Base class for chevereto extractors"""
|
||||||
basecategory = "chevereto"
|
basecategory = "chevereto"
|
||||||
directory_fmt = ("{category}", "{user}", "{album}",)
|
directory_fmt = ("{category}", "{user}", "{album}")
|
||||||
archive_fmt = "{id}"
|
archive_fmt = "{id}"
|
||||||
|
|
||||||
def _init(self):
|
def _init(self):
|
||||||
@@ -111,7 +111,7 @@ class CheveretoAlbumExtractor(CheveretoExtractor):
|
|||||||
class CheveretoUserExtractor(CheveretoExtractor):
|
class CheveretoUserExtractor(CheveretoExtractor):
|
||||||
"""Extractor for chevereto Users"""
|
"""Extractor for chevereto Users"""
|
||||||
subcategory = "user"
|
subcategory = "user"
|
||||||
pattern = BASE_PATTERN + r"(/(?!img|image|a(?:lbum)?)[^/?#]+(?:/albums)?)"
|
pattern = BASE_PATTERN + r"(/[^/?#]+(?:/albums)?)"
|
||||||
example = "https://jpg2.su/USER"
|
example = "https://jpg2.su/USER"
|
||||||
|
|
||||||
def items(self):
|
def items(self):
|
||||||
|
|||||||
@@ -39,4 +39,11 @@ __tests__ = (
|
|||||||
"#count" : 30,
|
"#count" : 30,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://imagepond.net/ap000",
|
||||||
|
"#comment" : "username starting with 'a' (#8149)",
|
||||||
|
"#category": ("chevereto", "imagepond", "user"),
|
||||||
|
"#class" : chevereto.CheveretoUserExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user