mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-05-07 03:48:44 +08:00
Compare commits
6 Commits
c770e90752
...
6dd13acc3b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6dd13acc3b | ||
![]() |
1e24b81f26 | ||
![]() |
cc17878bc6 | ||
![]() |
4eef47bd48 | ||
![]() |
cdfb72b517 | ||
![]() |
d3586e06af |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,16 +4,17 @@ const got = require('got');
|
|||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const { readFile } = require('fs/promises');
|
const { readFile } = require('fs/promises');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
|
||||||
const qlDir = '/ql';
|
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
let Fileexists280 = fs.existsSync('/ql/data/db/keyv.sqlite');
|
||||||
let Fileexists = fs.existsSync('/ql/data/config/auth.json');
|
let Fileexists = fs.existsSync('/ql/data/config/auth.json');
|
||||||
let authFile = "";
|
let authFile = "";
|
||||||
if (Fileexists)
|
if (Fileexists280)
|
||||||
|
authFile = "/ql/data/db/keyv.sqlite"
|
||||||
|
else if (Fileexists)
|
||||||
authFile = "/ql/data/config/auth.json"
|
authFile = "/ql/data/config/auth.json"
|
||||||
else
|
else
|
||||||
authFile = "/ql/config/auth.json"
|
authFile = "/ql/config/auth.json"
|
||||||
//const authFile = path.join(qlDir, 'config/auth.json');
|
|
||||||
|
|
||||||
const api = got.extend({
|
const api = got.extend({
|
||||||
prefixUrl: 'http://127.0.0.1:5600',
|
prefixUrl: 'http://127.0.0.1:5600',
|
||||||
@ -21,10 +22,11 @@ const api = got.extend({
|
|||||||
});
|
});
|
||||||
|
|
||||||
async function getToken() {
|
async function getToken() {
|
||||||
const authConfig = JSON.parse(await readFile(authFile));
|
const authConfig = await readFile(authFile);
|
||||||
return authConfig.token;
|
// console.log(authConfig.toString().match(/"token":"(.*?)",/)[1])
|
||||||
|
return authConfig.toString().match(/"token":"(.*?)",/)[1];
|
||||||
}
|
}
|
||||||
|
// getToken()
|
||||||
module.exports.getEnvs = async () => {
|
module.exports.getEnvs = async () => {
|
||||||
const token = await getToken();
|
const token = await getToken();
|
||||||
const body = await api({
|
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
19
jd_dplh0117.js
Normal file
File diff suppressed because one or more lines are too long
19
jd_dplh0121.js
Normal file
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
76
jd_indeps.sh
76
jd_indeps.sh
@ -1,46 +1,64 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#依赖安装,运行一次就好
|
#依赖安装
|
||||||
#0 8 5 5 * jd_indeps.sh
|
#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
|
if [[ $npm_ver -ge 7 ]];then
|
||||||
export PNPM_HOME="/root/.local/share/pnpm"
|
export PNPM_HOME="/root/.local/share/pnpm"
|
||||||
export PATH="$PNPM_HOME:$PATH"
|
export PATH="$PNPM_HOME:$PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "安装脚本所需依赖,不一定一次全部安装成功,请自己检查\n"
|
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 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 config set registry https://registry.npmmirror.com
|
||||||
pnpm install -g
|
pnpm install -g
|
||||||
pnpm install -g adler-32
|
pnpm i -g tough-cookie
|
||||||
pnpm install -g png-js
|
pnpm i -g ds@2.0.2
|
||||||
pnpm install -g date-fns
|
pnpm i -g png-js@1.0.0
|
||||||
pnpm install -g axios@1.6.7
|
pnpm i -g date-fns@3.6.0
|
||||||
pnpm install -g crypto-js
|
pnpm i -g axios@1.7.4
|
||||||
pnpm install -g ts-md5
|
pnpm i -g crypto-js@4.2.0
|
||||||
pnpm install -g tslib
|
# pnpm install -g ts-md5@1.3.1
|
||||||
pnpm install -g global-agent
|
# pnpm install -g tslib@2.6.3
|
||||||
pnpm install -g @types/node
|
# pnpm install -g @types/node@22.4.0
|
||||||
pnpm install -g request
|
pnpm i -g request@2.88.2
|
||||||
pnpm install -g jsdom
|
pnpm i -g jsdom@24.1.1
|
||||||
pnpm install -g crc
|
pnpm i -g moment@2.30.1
|
||||||
pnpm install -g qs
|
pnpm i -g cheerio@1.0.0
|
||||||
pnpm install -g moment
|
pnpm i -g tunnel
|
||||||
pnpm install -g cheerio
|
# pnpm install -g tough-cookie@4.1.4
|
||||||
pnpm install -g dotenv
|
pnpm i -g https-proxy-agent@7.0.5
|
||||||
pnpm install -g got@11.8.6
|
pip3 install -i https://pypi.doubanio.com/simple/ jieba
|
||||||
pnpm install -g sharp@0.32.6
|
pip3 install -i https://pypi.doubanio.com/simple/ requests
|
||||||
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
|
|
||||||
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
|
rm -rf /usr/local/pnpm-global/5/node_modules/.pnpm/canvas*
|
||||||
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
|
rm -rf /root/.local/share/pnpm/global/5/.pnpm/canvas*
|
||||||
|
pnpm i -g sharp@0.32.0
|
||||||
echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
|
echo -e "\n所需依赖安装完成,请检查有没有报错,可尝试再次运行"
|
File diff suppressed because one or more lines are too long
14
jd_opencard_0107.js
Normal file
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
@ -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 = {
|
const options = {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: `${args_xh.h5st_server}/h5st`,
|
url: `${args_xh.h5st_server}/h5st`,
|
||||||
headers: { 'content-type': 'application/json' },
|
headers: { 'content-type': 'application/json' },
|
||||||
data: {
|
data: {
|
||||||
version: version,
|
|
||||||
pin: $.UserName,
|
pin: $.UserName,
|
||||||
ua: $.userAgent,
|
ua: $.userAgent,
|
||||||
body,
|
body,
|
||||||
appId,
|
appId,
|
||||||
},
|
},
|
||||||
|
if (version) {
|
||||||
|
data.version = version;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
const { data } = await axios.request(options);
|
const { data } = await axios.request(options);
|
||||||
return data.body;
|
return data.body;
|
||||||
|
File diff suppressed because one or more lines are too long
1137
utils/baseUtils.js
1137
utils/baseUtils.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user