novel-downloader
novel-downloader copied to clipboard
[Feature Requset] I would like to request modifications to the VIP chapter script on Jinjiang.
存在问题 目前存在什么问题。 Even numbered chapter cannot be downloaded.
目标愿景 希望实现的目标。 I am sharing the analysis results because it is inconvenient to manually modify it for each chapter.
参考建议 可以供参考的建议。 This is the modification request code.
let _hash = '';
let hashSlice = '';
if (chapterid % 2 == 1) {
_hash = novelid + "." + chapterid + "." + readerid + "." + accessKey;
}
else {
_hash = accessKey + "-" + novelid + "-" + chapterid + "-" + readerid;
}
const hash = external_CryptoJS_.MD5(_hash).toString();
const convert = (input) => {
let out = 0;
for (let i = 0; i < input.length; i++) {
out += input.charCodeAt(i);
}
return out;
};
const accessKeyConvert = convert(accessKey);
if (chapterid % 2 == 1) {
hashSlice = hash.slice(accessKeyConvert % hash.length) + hash.slice(0, accessKeyConvert % hash.length);
}
else {
hashSlice = hash.slice(accessKeyConvert % (hash.length + 1)) + hash.slice(0, accessKeyConvert % (hash.length + 1));
}
补充内容 其他补充内容。 https://github.com/404-novel-project/novel-downloader/blob/0333ae673a8c9b8abb93a9365e384f80cd650c17/src/rules/special/original/jjwxc.ts#L616