[rule34us:tag] support URLs with empty 'q' query parameter (#8546)
This commit is contained in:
@@ -57,7 +57,7 @@ class Rule34usTagExtractor(Rule34usExtractor):
|
||||
subcategory = "tag"
|
||||
directory_fmt = ("{category}", "{search_tags}")
|
||||
archive_fmt = "t_{search_tags}_{id}"
|
||||
pattern = r"(?:https?://)?rule34\.us/index\.php\?r=posts/index&q=([^&#]+)"
|
||||
pattern = r"(?:https?://)?rule34\.us/index\.php\?r=posts/index&q=([^&#]*)"
|
||||
example = "https://rule34.us/index.php?r=posts/index&q=TAG"
|
||||
|
||||
def __init__(self, match):
|
||||
|
||||
@@ -14,6 +14,15 @@ __tests__ = (
|
||||
"#class" : rule34us.Rule34usTagExtractor,
|
||||
"#pattern" : r"https://img\d*\.rule34\.us/images/../../[0-9a-f]{32}\.\w+",
|
||||
"#count" : 10,
|
||||
|
||||
"search_tags": "[terios]_elysion",
|
||||
},
|
||||
|
||||
{
|
||||
"#url" : "https://rule34.us/index.php?r=posts/index&q=",
|
||||
"#comment" : "empty 'q' query parameter (#8546)",
|
||||
"#category": ("booru", "rule34us", "tag"),
|
||||
"#class" : rule34us.Rule34usTagExtractor,
|
||||
},
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user