1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-25 12:12:34 +01:00

[idolcomplex] support alphanumeric post IDs (#5171)

This commit is contained in:
Mike Fährmann 2024-02-07 14:57:13 +01:00
parent 6e928300bc
commit 6ef143ea31
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88
2 changed files with 9 additions and 3 deletions

View File

@ -35,7 +35,7 @@ class IdolcomplexExtractor(SankakuExtractor):
def _init(self):
self.find_pids = re.compile(
r" href=[\"#]/\w\w/posts/([0-9a-f]+)"
r" href=[\"#]/\w\w/posts/(\w+)"
).findall
self.find_tags = re.compile(
r'tag-type-([^"]+)">\s*<a [^>]*?href="/[^?]*\?tags=([^"]+)'
@ -258,7 +258,7 @@ class IdolcomplexPostExtractor(IdolcomplexExtractor):
"""Extractor for single images from idol.sankakucomplex.com"""
subcategory = "post"
archive_fmt = "{id}"
pattern = BASE_PATTERN + r"/posts?/(?:show/)?([0-9a-f]+)"
pattern = BASE_PATTERN + r"/posts?/(?:show/)?(\w+)"
example = "https://idol.sankakucomplex.com/posts/0123456789abcdef"
def __init__(self, match):

View File

@ -61,7 +61,7 @@ __tests__ = (
},
{
"#url" : "https://idol.sankakucomplex.com/en/posts/509eccbba54a43cea6b275a65b93c51d",
"#url" : "https://idol.sankakucomplex.com/en/posts/vkr36qdOaZ4",
"#category": ("booru", "idolcomplex", "post"),
"#class" : idolcomplex.IdolcomplexPostExtractor,
"#sha1_content": "694ec2491240787d75bf5d0c75d0082b53a85afd",
@ -86,6 +86,12 @@ __tests__ = (
"width" : 1024,
},
{
"#url" : "https://idol.sankakucomplex.com/en/posts/509eccbba54a43cea6b275a65b93c51d",
"#category": ("booru", "idolcomplex", "post"),
"#class" : idolcomplex.IdolcomplexPostExtractor,
},
{
"#url" : "https://idol.sankakucomplex.com/en/posts/show/509eccbba54a43cea6b275a65b93c51d",
"#category": ("booru", "idolcomplex", "post"),