mirror of https://github.com/NobyDa/Script.git
commit
8add73a049
|
@ -13,10 +13,11 @@ Safari浏览器打开 https://m.iqiyi.com/user.html 使用密码登录, 如通
|
||||||
|
|
||||||
如果使用Node.js, 需自行安装'request'模块. 例: npm install request -g
|
如果使用Node.js, 需自行安装'request'模块. 例: npm install request -g
|
||||||
|
|
||||||
Node.js相关:
|
Node.js环境变量相关:
|
||||||
Cookie环境变量:IQIYI_COOKIE
|
Cookie:IQIYI_COOKIE
|
||||||
Debug环境变量:IQIYI_DEBUG
|
Debug调试:IQIYI_DEBUG
|
||||||
Bark推送环境变量:BARK_PUSH
|
Bark通知推送Key:BARK_PUSH
|
||||||
|
Bark服务端(默认官方):BARK_SERVER
|
||||||
|
|
||||||
JsBox, Node.js用户获取Cookie说明:
|
JsBox, Node.js用户获取Cookie说明:
|
||||||
方法一手机:开启抓包, 网页登录 https://m.iqiyi.com/user.html 返回抓包APP搜索URL关键字 apis/user/info.action 复制请求头中的Cookie字段填入以下脚本变量或环境变量中即可
|
方法一手机:开启抓包, 网页登录 https://m.iqiyi.com/user.html 返回抓包APP搜索URL关键字 apis/user/info.action 复制请求头中的Cookie字段填入以下脚本变量或环境变量中即可
|
||||||
|
@ -28,6 +29,8 @@ var cookie = ''; //单引号内填入手动获取的Cookie
|
||||||
|
|
||||||
var barkKey = ''; //Bark APP 通知推送Key
|
var barkKey = ''; //Bark APP 通知推送Key
|
||||||
|
|
||||||
|
var barkServer = ''; //Bark APP 通知服务端地址(默认官方)
|
||||||
|
|
||||||
/*********************
|
/*********************
|
||||||
QuantumultX 远程脚本配置:
|
QuantumultX 远程脚本配置:
|
||||||
**********************
|
**********************
|
||||||
|
@ -88,6 +91,7 @@ var $nobyda = nobyda();
|
||||||
cookie = cookie || process.env.IQIYI_COOKIE;
|
cookie = cookie || process.env.IQIYI_COOKIE;
|
||||||
LogDetails = LogDetails || process.env.IQIYI_DEBUG;
|
LogDetails = LogDetails || process.env.IQIYI_DEBUG;
|
||||||
barkKey = barkKey || process.env.BARK_PUSH;
|
barkKey = barkKey || process.env.BARK_PUSH;
|
||||||
|
barkServer = barkServer || process.env.BARK_SERVER;
|
||||||
}
|
}
|
||||||
if ($nobyda.isRequest) {
|
if ($nobyda.isRequest) {
|
||||||
GetCookie()
|
GetCookie()
|
||||||
|
@ -119,7 +123,7 @@ var $nobyda = nobyda();
|
||||||
}
|
}
|
||||||
const expires = $nobyda.expire ? $nobyda.expire.replace(/\u5230\u671f/, "") : "获取失败 ⚠️"
|
const expires = $nobyda.expire ? $nobyda.expire.replace(/\u5230\u671f/, "") : "获取失败 ⚠️"
|
||||||
if (!$nobyda.isNode) $nobyda.notify("爱奇艺", "到期时间: " + expires, pushMsg.join('\n'));
|
if (!$nobyda.isNode) $nobyda.notify("爱奇艺", "到期时间: " + expires, pushMsg.join('\n'));
|
||||||
if (barkKey) await BarkNotify($nobyda, barkKey, '爱奇艺', `到期时间: ${expires}\n${pushMsg.join('\n')}`);
|
if (barkKey) await BarkNotify($nobyda, barkKey, '爱奇艺', `到期时间: ${expires}\n${pushMsg.join('\n')}`, barkServer);
|
||||||
await $nobyda.time();
|
await $nobyda.time();
|
||||||
} else {
|
} else {
|
||||||
console.log(`Cookie缺少关键值,需重新获取`)
|
console.log(`Cookie缺少关键值,需重新获取`)
|
||||||
|
@ -428,7 +432,7 @@ function GetCookie() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function BarkNotify(c,k,t,b){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}}
|
async function BarkNotify(c,k,t,b,p){for(let i=0;i<3;i++){console.log(`🔷Bark notify >> Start push (${i+1})`);const s=await new Promise((n)=>{c.post({url:p||'https://api.day.app/push',headers:{'Content-Type':'application/json'},body:JSON.stringify({title:t,body:b,device_key:k,ext_params:{group:t}})},(e,r,d)=>r&&r.status==200?n(1):n(d||e))});if(s===1){console.log('✅Push success!');break}else{console.log(`❌Push failed! >> ${s.message||s}`)}}}
|
||||||
|
|
||||||
function nobyda() {
|
function nobyda() {
|
||||||
const times = 0
|
const times = 0
|
||||||
|
|
Loading…
Reference in New Issue