check if the IP is banned

This commit is contained in:
nyne
2024-10-25 23:03:45 +08:00
parent 93a399c052
commit 4d19c41708

View File

@@ -195,6 +195,12 @@ class Ehentai extends ComicSource {
Network.setCookies('https://exhentai.org', cookies) Network.setCookies('https://exhentai.org', cookies)
throw `Exception: empty data\nYou may not have permission to access this page.` throw `Exception: empty data\nYou may not have permission to access this page.`
} }
if(res.body[0] !== '<') {
if(res.body.includes("IP")) {
throw "Your IP address has been banned"
}
throw "Failed to load page"
}
let document = new HtmlDocument(res.body); let document = new HtmlDocument(res.body);
let galleries = []; let galleries = [];