Skip to content

Commit

Permalink
Bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
NobyDa committed Jun 18, 2022
1 parent 9921723 commit b1bf8ad
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
11 changes: 6 additions & 5 deletions KuaiKan-DailyBonus/KKMH.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
快看漫画签到脚本
更新时间: 2021.9.22
更新时间: 2022.06.18
脚本兼容: QuantumultX, Surge4, Loon, Node.js
电报频道: @NobyDa
问题反馈: @NobyDa_bot
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions iQIYI-DailyBonus/iQIYI.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
爱奇艺会员签到脚本
更新时间: 2022.2.7
更新时间: 2022.06.18
脚本兼容: QuantumultX, Surge4, Loon, JsBox, Node.js
电报频道: @NobyDa
问题反馈: @NobyDa_bot
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b1bf8ad

Please sign in to comment.