Bug fixes.

This commit is contained in:
NobyDa 2022-06-18 18:39:54 +08:00
parent 992172320c
commit b1bf8ad650
No known key found for this signature in database
GPG Key ID: E6B0AC788D373C5B
2 changed files with 8 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/*
快看漫画签到脚本
更新时间: 2021.9.22
更新时间: 2022.06.18
脚本兼容: QuantumultX, Surge4, Loon, Node.js
电报频道: @NobyDa
问题反馈: @NobyDa_bot
@ -174,13 +174,14 @@ function GiftPack(type) {
function GetCookie() {
const RA = $.getdata("@KKMH.COOKIE")
const TM = $.getdata("@KKMH.TIME")
if (JSON.stringify($request.headers).match(/session=/)) {
if (RA != $request.headers['Cookie']) {
if ($.setdata($request.headers['Cookie'], "@KKMH.COOKIE")) {
const CK = $request.headers['Cookie'] || $request.headers['cookie'];
if (JSON.stringify($request.headers).match(/session=/) && CK) {
if (RA != CK) {
if ($.setdata(CK, "@KKMH.COOKIE")) {
$.setdata(JSON.stringify(Date.now()), "@KKMH.TIME")
if (!TM || TM && (Date.now() - TM) / 1000 >= 21600) {
$.msg(`${RA?`更新`:`首次写入`}${$.name}Cookie成功 🎉`, "", "", imgUrl)
} else if (RA.match(/uid=\d+/)[0] == $request.headers['Cookie'].match(/uid=\d+/)[0]) {
} else if (RA.match(/uid=\d+/)[0] == CK.match(/uid=\d+/)[0]) {
$.log(`\n更新${$.name}Cookie成功! 🎉\n检测到频繁通知, 已转为输出日志`)
} else {
$.msg(`更新${$.name}Cookie成功 🎉`, "", "", imgUrl)

View File

@ -1,7 +1,7 @@
/*
爱奇艺会员签到脚本
更新时间: 2022.2.7
更新时间: 2022.06.18
脚本兼容: QuantumultX, Surge4, Loon, JsBox, Node.js
电报频道: @NobyDa
问题反馈: @NobyDa_bot
@ -416,7 +416,7 @@ function GetCookie() {
$nobyda.notify(`写入爱奇艺Cookie失败`, "", "请更新脚本配置(URL正则/MITM)");
return
}
var CKA = $request.headers['Cookie'];
var CKA = $request.headers['Cookie'] || $request.headers['cookie'];;
var iQIYI = CKA && CKA.includes("P00001=") && CKA.includes("P00003=") && CKA;
var RA = $nobyda.read("CookieQY")
if (CKA && iQIYI) {