[e621] match 'tag' search URLs with empty tag (#6783)

This commit is contained in:
Mike Fährmann
2025-01-07 20:00:26 +01:00
parent d18f311fe2
commit 89276c5b3e
2 changed files with 7 additions and 1 deletions

View File

@@ -90,7 +90,7 @@ BASE_PATTERN = E621Extractor.update({
class E621TagExtractor(E621Extractor, danbooru.DanbooruTagExtractor):
"""Extractor for e621 posts from tag searches"""
pattern = BASE_PATTERN + r"/posts?(?:\?.*?tags=|/index/\d+/)([^&#]+)"
pattern = BASE_PATTERN + r"/posts?(?:\?[^#]*?tags=|/index/\d+/)([^&#]*)"
example = "https://e621.net/posts?tags=TAG"

View File

@@ -29,6 +29,12 @@ __tests__ = (
"#class" : e621.E621TagExtractor,
},
{
"#url" : "https://e621.net/post?tags=",
"#category": ("E621", "e621", "tag"),
"#class" : e621.E621TagExtractor,
},
{
"#url" : "https://e621.net/pools/73",
"#category": ("E621", "e621", "pool"),