[sankaku] support '/posts/' URLs (#4688)
This commit is contained in:
@@ -143,7 +143,7 @@ class SankakuPostExtractor(SankakuExtractor):
|
|||||||
"""Extractor for single posts from sankaku.app"""
|
"""Extractor for single posts from sankaku.app"""
|
||||||
subcategory = "post"
|
subcategory = "post"
|
||||||
archive_fmt = "{id}"
|
archive_fmt = "{id}"
|
||||||
pattern = BASE_PATTERN + r"/post/show/([0-9a-f]+)"
|
pattern = BASE_PATTERN + r"/post(?:s|/show)/([0-9a-f]+)"
|
||||||
example = "https://sankaku.app/post/show/12345"
|
example = "https://sankaku.app/post/show/12345"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -147,6 +147,18 @@ __tests__ = (
|
|||||||
"md5": "f8ba89043078f0e4be2d9c46550b840a",
|
"md5": "f8ba89043078f0e4be2d9c46550b840a",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://chan.sankakucomplex.com/posts/f8ba89043078f0e4be2d9c46550b840a",
|
||||||
|
"#comment" : "/posts/ instead of /post/show/ (#4688)",
|
||||||
|
"#category": ("booru", "sankaku", "post"),
|
||||||
|
"#class" : sankaku.SankakuPostExtractor,
|
||||||
|
"#pattern" : r"https://s\.sankakucomplex\.com/data/f8/ba/f8ba89043078f0e4be2d9c46550b840a\.jpg",
|
||||||
|
"#count" : 1,
|
||||||
|
|
||||||
|
"id" : 33195194,
|
||||||
|
"md5": "f8ba89043078f0e4be2d9c46550b840a",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://chan.sankakucomplex.com/post/show/360451",
|
"#url" : "https://chan.sankakucomplex.com/post/show/360451",
|
||||||
"#category": ("booru", "sankaku", "post"),
|
"#category": ("booru", "sankaku", "post"),
|
||||||
|
|||||||
Reference in New Issue
Block a user