[sankaku] support '/posts/' tag search URLs (#4740)
This commit is contained in:
@@ -87,7 +87,7 @@ class SankakuTagExtractor(SankakuExtractor):
|
|||||||
subcategory = "tag"
|
subcategory = "tag"
|
||||||
directory_fmt = ("{category}", "{search_tags}")
|
directory_fmt = ("{category}", "{search_tags}")
|
||||||
archive_fmt = "t_{search_tags}_{id}"
|
archive_fmt = "t_{search_tags}_{id}"
|
||||||
pattern = BASE_PATTERN + r"/?\?([^#]*)"
|
pattern = BASE_PATTERN + r"(?:/posts)?/?\?([^#]*)"
|
||||||
example = "https://sankaku.app/?tags=TAG"
|
example = "https://sankaku.app/?tags=TAG"
|
||||||
|
|
||||||
def __init__(self, match):
|
def __init__(self, match):
|
||||||
|
|||||||
@@ -53,6 +53,20 @@ __tests__ = (
|
|||||||
"#class" : sankaku.SankakuTagExtractor,
|
"#class" : sankaku.SankakuTagExtractor,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://chan.sankakucomplex.com/posts?tags=TAG",
|
||||||
|
"#comment" : "'/posts' in tag search URL (#4740)",
|
||||||
|
"#category": ("booru", "sankaku", "tag"),
|
||||||
|
"#class" : sankaku.SankakuTagExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"#url" : "https://chan.sankakucomplex.com/ja/posts/?tags=あえいおう",
|
||||||
|
"#comment" : "'/posts' in tag search URL (#4740)",
|
||||||
|
"#category": ("booru", "sankaku", "tag"),
|
||||||
|
"#class" : sankaku.SankakuTagExtractor,
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"#url" : "https://chan.sankakucomplex.com/?tags=bonocho+a+b+c+d",
|
"#url" : "https://chan.sankakucomplex.com/?tags=bonocho+a+b+c+d",
|
||||||
"#comment" : "error on five or more tags",
|
"#comment" : "error on five or more tags",
|
||||||
|
|||||||
Reference in New Issue
Block a user