mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
update
This commit is contained in:
parent
30ce760ea1
commit
38b96593e2
@ -1,6 +1,35 @@
|
||||
// 本地测试在这边填写cookie
|
||||
let cookie = [
|
||||
];
|
||||
module.exports = {
|
||||
cookie
|
||||
/*
|
||||
此文件为Node.js专用。其他用户请忽略
|
||||
*/
|
||||
//此处填写京东账号cookie。
|
||||
let CookieJDs = [
|
||||
'',//账号一ck,例:pt_key=XXX;pt_pin=XXX;
|
||||
'',//账号二ck,例:pt_key=XXX;pt_pin=XXX;如有更多,依次类推
|
||||
]
|
||||
// 判断环境变量里面是否有京东ck
|
||||
if (process.env.JD_COOKIE) {
|
||||
if (process.env.JD_COOKIE.indexOf('&') > -1) {
|
||||
CookieJDs = process.env.JD_COOKIE.split('&');
|
||||
} else if (process.env.JD_COOKIE.indexOf('\n') > -1) {
|
||||
CookieJDs = process.env.JD_COOKIE.split('\n');
|
||||
} else {
|
||||
CookieJDs = [process.env.JD_COOKIE];
|
||||
}
|
||||
}
|
||||
if (JSON.stringify(process.env).indexOf('GITHUB')>-1) {
|
||||
console.log(`请勿使用github action运行此脚本,无论你是从你自己的私库还是其他哪里拉取的源代码,都会导致我被封号\n`);
|
||||
!(async () => {
|
||||
await require('./sendNotify').sendNotify('提醒', `请勿使用github action、滥用github资源会封我仓库以及账号`)
|
||||
await process.exit(0);
|
||||
})()
|
||||
}
|
||||
CookieJDs = [...new Set(CookieJDs.filter(item => !!item))]
|
||||
console.log(`\n====================共${CookieJDs.length}个京东账号Cookie=================\n`);
|
||||
console.log(`============脚本执行时间:${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString('chinese',{hour12:false})}=============\n`)
|
||||
if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {};
|
||||
for (let i = 0; i < CookieJDs.length; i++) {
|
||||
if (!CookieJDs[i].match(/pt_pin=(.+?);/) || !CookieJDs[i].match(/pt_key=(.+?);/)) console.log(`\n提示:京东cookie 【${CookieJDs[i]}】填写不规范,可能会影响部分脚本正常使用。正确格式为: pt_key=xxx;pt_pin=xxx;(分号;不可少)\n`);
|
||||
const index = (i + 1 === 1) ? '' : (i + 1);
|
||||
exports['CookieJD' + index] = CookieJDs[i].trim();
|
||||
}
|
||||
console.log('>>>>>>>>>>>>>>Faker 提示:任务正常运行中>>>>>>>>>>>>>>>\n')
|
5130
function/signdps.js
Normal file
5130
function/signdps.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user