Compare commits

...

6 Commits

Author SHA1 Message Date
Faker
6dd13acc3b Update jd_indeps.sh 2025-01-22 09:39:33 +08:00
Faker
1e24b81f26 1 2025-01-21 09:42:27 +08:00
Faker
cc17878bc6 1 2025-01-19 13:49:13 +08:00
Faker
4eef47bd48 update 2025-01-19 01:32:05 +08:00
Faker
cdfb72b517 1 2025-01-17 14:55:50 +08:00
Faker
d3586e06af 1 2025-01-17 09:38:07 +08:00
21 changed files with 1763 additions and 1807 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,16 +4,17 @@ const got = require('got');
require('dotenv').config();
const { readFile } = require('fs/promises');
const path = require('path');
const qlDir = '/ql';
const fs = require('fs');
let Fileexists280 = fs.existsSync('/ql/data/db/keyv.sqlite');
let Fileexists = fs.existsSync('/ql/data/config/auth.json');
let authFile = "";
if (Fileexists)
if (Fileexists280)
authFile = "/ql/data/db/keyv.sqlite"
else if (Fileexists)
authFile = "/ql/data/config/auth.json"
else
authFile = "/ql/config/auth.json"
//const authFile = path.join(qlDir, 'config/auth.json');
const api = got.extend({
prefixUrl: 'http://127.0.0.1:5600',
@ -21,10 +22,11 @@ const api = got.extend({
});
async function getToken() {
const authConfig = JSON.parse(await readFile(authFile));
return authConfig.token;
const authConfig = await readFile(authFile);
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
return authConfig.toString().match(/"token":"(.*?)",/)[1];
}
// getToken()
module.exports.getEnvs = async () => {
const token = await getToken();
const body = await api({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

19
jd_dplh0117.js Normal file

File diff suppressed because one or more lines are too long

19
jd_dplh0121.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,46 +1,64 @@
#!/usr/bin/env bash
#依赖安装,运行一次就好
#依赖安装
#0 8 5 5 * jd_indeps.sh
#new Env('依赖安装')
#new Env('依赖安装');
#updatedate:20240903
#
npm_ver=$(pnpm -v | awk -F. '{print $1}')
DIR="$( pwd )"
dir_root=/ql
dir_repo=$dir_root/repo
dir_deps=$dir_root/deps
if [[ $AUTOCFG == 'true' ]];then
if [[ -z "$(echo "$DIR"|grep 'main')" ]];then
dir_code=$dir_log/6dylan6_jdpro_jd_sharecode
repo='6dylan6_jdpro'
else
dir_code=$dir_log/6dylan6_jdpro_main_jd_sharecode
repo='6dylan6_jdpro_main'
fi
[[ -d $dir_root/data ]] && dir_data=$dir_root/data
[[ -d $dir_data/repo ]] && dir_repo=$dir_data/repo
[[ -d $dir_data/deps ]] && dir_deps=$dir_data/deps
cp $dir_repo/${repo}/sendNotify.js $dir_deps/ > /dev/null 2>&1
echo -e "\n已配置sendNotify.js文件到deps目录下再次执行订阅生效\n"
else
echo -e "\n如需自动配置sendNotify.js文件到desp目录下请配置变量AUTOCFG='true'\n"
fi
npm_ver=`pnpm -v|awk -F. '{print $1}'`
if [[ $npm_ver -ge 7 ]];then
export PNPM_HOME="/root/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
fi
echo -e "安装脚本所需依赖,不一定一次全部安装成功,请自己检查\n"
echo -e "安装所需依赖,不一定一次全部安装成功,完成请检查\n"
echo -e "开始安装............\n"
#apk add g++ make pixman-dev pango-dev cairo-dev pkgconf --no-cache
apk add g++ make --no-cache
#apk add g++ make --no-cache
pnpm config set registry https://registry.npmmirror.com
pnpm install -g
pnpm install -g adler-32
pnpm install -g png-js
pnpm install -g date-fns
pnpm install -g axios@1.6.7
pnpm install -g crypto-js
pnpm install -g ts-md5
pnpm install -g tslib
pnpm install -g global-agent
pnpm install -g @types/node
pnpm install -g request
pnpm install -g jsdom
pnpm install -g crc
pnpm install -g qs
pnpm install -g moment
pnpm install -g cheerio
pnpm install -g dotenv
pnpm install -g got@11.8.6
pnpm install -g sharp@0.32.6
pnpm install -g tough-cookie
pnpm install -g https-proxy-agent@7.0.2
pnpm install -g http-cookie-agent
pnpm install -g console-table-printer@2.12.0
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ jieba
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ requests
pnpm i -g tough-cookie
pnpm i -g ds@2.0.2
pnpm i -g png-js@1.0.0
pnpm i -g date-fns@3.6.0
pnpm i -g axios@1.7.4
pnpm i -g crypto-js@4.2.0
# pnpm install -g ts-md5@1.3.1
# pnpm install -g tslib@2.6.3
# pnpm install -g @types/node@22.4.0
pnpm i -g request@2.88.2
pnpm i -g jsdom@24.1.1
pnpm i -g moment@2.30.1
pnpm i -g cheerio@1.0.0
pnpm i -g tunnel
# pnpm install -g tough-cookie@4.1.4
pnpm i -g https-proxy-agent@7.0.5
pip3 install -i https://pypi.doubanio.com/simple/ jieba
pip3 install -i https://pypi.doubanio.com/simple/ requests
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
pnpm i -g sharp@0.32.0
echo -e "\n所需依赖安装完成请检查有没有报错可尝试再次运行"

File diff suppressed because one or more lines are too long

14
jd_opencard_0107.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -730,18 +730,20 @@ async function try_feedsList(tabId, page) {
}
}
async function h5stSign(body, appId, version = '5.0.3') {
async function h5stSign(body, appId, version) {
const options = {
method: 'POST',
url: `${args_xh.h5st_server}/h5st`,
headers: { 'content-type': 'application/json' },
data: {
version: version,
pin: $.UserName,
ua: $.userAgent,
body,
appId,
},
if (version) {
data.version = version;
}
};
const { data } = await axios.request(options);
return data.body;

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff