[sankaku] support '/posts/' tag search URLs (#4740)
This commit is contained in:
@@ -87,7 +87,7 @@ class SankakuTagExtractor(SankakuExtractor):
|
||||
subcategory = "tag"
|
||||
directory_fmt = ("{category}", "{search_tags}")
|
||||
archive_fmt = "t_{search_tags}_{id}"
|
||||
pattern = BASE_PATTERN + r"/?\?([^#]*)"
|
||||
pattern = BASE_PATTERN + r"(?:/posts)?/?\?([^#]*)"
|
||||
example = "https://sankaku.app/?tags=TAG"
|
||||
|
||||
def __init__(self, match):
|
||||
|
||||
@@ -53,6 +53,20 @@ __tests__ = (
|
||||
"#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",
|
||||
"#comment" : "error on five or more tags",
|
||||
|
||||
Reference in New Issue
Block a user