[zerochan] normalize "No results" output message (#8313)

catch and handle '404 Not Found' responses
This commit is contained in:
Mike Fährmann
2025-09-29 08:58:07 +02:00
parent 30bf0c755d
commit 3de8d30765
2 changed files with 49 additions and 8 deletions

View File

@@ -45,6 +45,13 @@ __tests__ = (
"width" : r"re:^\d+$",
},
{
"#url" : "https://www.zerochan.net/non_existant_tag",
"#comment" : "handle HttpError exception (#8313)",
"#class" : zerochan.ZerochanTagExtractor,
"#count" : 0,
},
{
"#url" : "https://www.zerochan.net/2920445",
"#category": ("booru", "zerochan", "image"),
@@ -341,4 +348,20 @@ __tests__ = (
],
},
{
"#url" : "https://www.zerochan.net/1",
"#category": ("booru", "zerochan", "image"),
"#class" : zerochan.ZerochanImageExtractor,
"#count" : 0,
"#log" : "'deleted'",
},
{
"#url" : "https://www.zerochan.net/9876540",
"#category": ("booru", "zerochan", "image"),
"#class" : zerochan.ZerochanImageExtractor,
"#count" : 0,
"#log" : "'Not found'",
},
)