diff --git a/.env b/.env index 1b65aeba..5c4ce47d 100644 --- a/.env +++ b/.env @@ -3,5 +3,5 @@ USERNAMES=hahaha2,hahaha1,ha1,ha2,DrKBoogieWoogie,lsp,lsb #888存在问题 PASSWORDS="BfdSGt}F4!5pLHt,BfdSGt}F4!5pLHt,iTs9Wx4+3Eavkhk,W$RhQUVn5E?BBBq,]\"w%2Qd%M8Z6-SS,HU5B6Ee]kRB%Qj',uYE)46Ej8phu$#u" # 密码外面要加上双引号,密码内部如果有双引号,需要加上转义字符 反斜杠 \ WEBSITE=https://linux.do # 需要阅读的网站,支持后面那些:https://meta.discourse.org, https://meta.appinn.net, https://community.openai.com RUN_TIME_LIMIT_MINUTES=15 #运行时间,分钟为单位 -TELEGRAM_BOT_TOKEN=yourtoken -TELEGRAM_CHAT_ID=yourid +TELEGRAM_BOT_TOKEN= +TELEGRAM_CHAT_ID= diff --git a/bypasscf.js b/bypasscf.js index e2e3b280..fff63604 100644 --- a/bypasscf.js +++ b/bypasscf.js @@ -77,8 +77,7 @@ function delayClick(time) { try { if (usernames.length !== passwords.length) { console.log(usernames.length, usernames, passwords.length, passwords); - console.log("用户名和密码的数量不匹配!"); - return; + throw new error("用户名和密码的数量不匹配!"); } // 并发启动浏览器实例进行登录 @@ -99,7 +98,7 @@ function delayClick(time) { // 错误处理逻辑 console.error("发生错误:", error); if (token && chatId) { - sendToTelegram(`发生错误:${error.message}`); + sendToTelegram(`${error.message}`); } } })(); @@ -218,7 +217,9 @@ async function launchBrowserForUser(username, password) { }); } } catch (err) { - throw new Error(err); + // throw new Error(err); + console.log("Error:", err); + sendToTelegram(`${err.message}`); } } async function login(page, username, password) {