feat: add headless Zoko source checks
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ struct ZokoCheck {
|
||||
let missing = "<span>// Error</span><span>404</span><h1>Not <span>found.</span></h1><p>We couldn't find anything to play here.</p>"
|
||||
try expect(.unavailable) { _ = try ZokoResolver.parse(page: missing, mediaID: "1", episode: 27) }
|
||||
for protected in ["<title>Just a moment</title>", "<script src='/cdn-cgi/challenge-platform/x'></script>",
|
||||
"<h1>Sorry, you have been blocked</h1>"] {
|
||||
"<h1>Sorry, you have been blocked</h1>", missing + "<div>captcha</div>"] {
|
||||
try expect(.protection) { _ = try ZokoResolver.parse(page: protected, mediaID: "1", episode: 1) }
|
||||
}
|
||||
for malformed in ["<html></html>", "window.__P='broken';", try page(config) + page(config), String(repeating: "x", count: ZokoResolver.bodyLimit + 1)] {
|
||||
|
||||
Reference in New Issue
Block a user