added more error handling
This commit is contained in:
1 parent
6a741cc93c
commit
87cadac2d6
1 file changed
+13
-1
+13
-1
@@ -55,11 +55,23 @@ async function runJob(job) {
|
|||||||
// ========== CAPTCHA / ERROR DETECTION ==========
|
// ========== CAPTCHA / ERROR DETECTION ==========
|
||||||
const suspicious =
|
const suspicious =
|
||||||
exitCode !== 0 ||
|
exitCode !== 0 ||
|
||||||
|
// general
|
||||||
output.toLowerCase().includes("captcha") ||
|
output.toLowerCase().includes("captcha") ||
|
||||||
output.toLowerCase().includes("403") ||
|
output.toLowerCase().includes("403") ||
|
||||||
output.toLowerCase().includes("blocked") ||
|
output.toLowerCase().includes("blocked") ||
|
||||||
output.toLowerCase().includes("token") ||
|
output.toLowerCase().includes("token") ||
|
||||||
output.toLowerCase().includes("forbidden");
|
output.toLowerCase().includes("forbidden") ||
|
||||||
|
|
||||||
|
// proxer_utils.py - get_embed_url()
|
||||||
|
output.toLowerCase().includes("Failed to fetch episode page") ||
|
||||||
|
output.toLowerCase().includes("Embed code not found in page content") ||
|
||||||
|
|
||||||
|
// proxer_utils.py - get_mp4_url()
|
||||||
|
output.toLowerCase().includes("Failed to fetch embed page") ||
|
||||||
|
output.toLowerCase().includes("MP4 URL not found in embed page") ||
|
||||||
|
|
||||||
|
// proxer_utils.py - download_mp4()
|
||||||
|
output.toLowerCase().includes("Failed to start download");
|
||||||
|
|
||||||
if (suspicious) {
|
if (suspicious) {
|
||||||
console.log("⛔ CAPTCHA or fatal error detected, notifying system");
|
console.log("⛔ CAPTCHA or fatal error detected, notifying system");
|
||||||
|
|||||||
Reference in new issue
Block a user