1
0
mirror of https://github.com/okyyds/yyds.git synced 2026-07-13 07:21:18 +08:00

Compare commits

...

19 Commits

Author SHA1 Message Date
ooo
8cd038ce72 爱的礼想型 2023-02-08 19:39:25 +08:00
ooo
d89392d8a5 1 2023-02-07 18:20:23 +08:00
ooo
685591c208 1 2023-02-06 00:38:12 +08:00
ooo
59569ea66c del 2023-01-20 02:03:52 +08:00
ooo
857bb0cacd del 2023-01-16 16:51:17 +08:00
ooo
c5b865f786 1 2023-01-13 22:29:07 +08:00
ooo
cd00939dc9 fix 2023-01-10 16:27:00 +08:00
ooo
86c88bbe84 1 2023-01-09 17:01:31 +08:00
ooo
73adc5865a del 2023-01-06 11:01:20 +08:00
ooo
89a7cd8d68 1 2023-01-04 01:29:12 +08:00
ooo
7084b6c3c6 del 2023-01-03 21:44:39 +08:00
ooo
cae8dfdd18 1 2023-01-02 22:36:08 +08:00
ooo
9a063e6ef3 1 2023-01-02 22:25:55 +08:00
ooo
2d7605fd25 1 2023-01-01 21:18:48 +08:00
ooo
d912fcd73d 1 2023-01-01 21:18:00 +08:00
ooo
b6fc59e1d7 1 2022-12-31 16:57:51 +08:00
ooo
1b18295358 1 2022-12-30 11:09:43 +08:00
ooo
360d6175e3 1 2022-12-30 11:04:00 +08:00
ooo
ddb2b022cf fix 2022-12-29 22:00:19 +08:00
8 changed files with 24 additions and 3244 deletions

7
jd_lzdz1.js Normal file

File diff suppressed because one or more lines are too long

View File

@@ -3,16 +3,16 @@
开卡延迟,默认 4000
opencard_delayTime
*/
const $ = new Env("双旦狂欢购 好物大联盟");
const $ = new Env("喜乐元宵,欢聚好礼");
const jdCookieNode = $.isNode() ? require("./jdCookie.js") : "";
const notify = $.isNode() ? require("./sendNotify") : "";
let cookiesArr = [], cookie = "", message = "";
let delayTime = process.env.opencard_delayTime ?? 4000;
let ownCode = null;
let authorCodeList = [
'2522db8a3d25405a8fa481bf4b0430f7',
'bec8b5a1302d4cd1aad18f2146ab44e7',
];
let activityId = '5fe4ab7165224fa8bf4dcbb4ebe8fa83'
let activityId = '6c0d1b3954db48299de4b0ad4096a037'
if ($.isNode()) {
Object.keys(jdCookieNode).forEach((item) => {
cookiesArr.push(jdCookieNode[item]);

File diff suppressed because one or more lines are too long

1062
jd_pet.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,64 +0,0 @@
//40 5,12,21 * * * m_jd_pet_automation.js
//问题反馈:https://t.me/Wall_E_Channel
const {Env} = require('./magic');
const $ = new Env('M萌宠自动化');
let commodityName = process.env.M_JD_PET_COMMODITY
? process.env.M_JD_PET_COMMODITY
: ''
$.log('默认4级商品生产指定商品请自行配置 M_JD_PET_COMMODITY')
$.logic = async function () {
let info = await api('initPetTown', {"version": 1});
$.log(JSON.stringify(info));
debugger
if (info?.result?.petStatus < 5) {
return
}
if (info?.result?.petStatus === 5) {
$.log(info?.result?.goodsInfo);
let activityId = info?.result?.goodsInfo.activityId;
let activityIds = info?.result?.goodsInfo.activityIds;
let data = await api('redPacketExchange',
{"activityId": activityId, "activityIds": activityIds});
$.putMsg(`${info?.result?.goodsInfo.exchangeMedalNum === 4 ? '12'
: '25'}红包,${$.formatDate(
$.timestamp() + data.result.pastDays * 24 * 60 * 60 * 1000)}过期`)
info = await api('initPetTown', {"version": 1});
}
if (info?.result?.petStatus === 6) {
info = await api('goodsInfoList', {"type": 2})
let goods = commodityName ? info.result.goodsList.filter(
o => o.goodsName.includes(commodityName))[0]
: info.result.goodsList.filter(o => o.exchangeMedalNum === 4)[0];
if (!goods) {
$.putMsg(`没找到你要生产的 ${commodityName}`)
return
}
info = await api('goodsInfoUpdate', {"goodsId": goods.goodsId})
$.putMsg(`生产【${info.result.goodsInfo.goodsName}】成功`)
}
};
$.run({
wait: [2000, 3000], whitelist: ['1-15']
}).catch(
reason => $.log(reason));
// noinspection DuplicatedCode
async function api(fn, body) {
let url = `https://api.m.jd.com/client.action?functionId=${fn}&body=${JSON.stringify(
body)}&client=apple&clientVersion=10.0.4&osVersion=13.7&appid=wh5&loginType=2&loginWQBiz=pet-town`
//↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓请求头↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
let headers = {
"Cookie": $.cookie,
"Connection": "keep-alive",
"Accept": "*/*",
"Host": "api.m.jd.com",
'User-Agent': `Mozilla/5.0 (iPhone; CPU iPhone OS 14_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 MicroMessenger/8.0.4(0x1800042c) NetType/4G Language/zh_CN miniProgram`,
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn"
}
let {data} = await $.request(url, headers)
await $.wait(1000, 3000)
return data;
}

File diff suppressed because one or more lines are too long

View File

@@ -96,7 +96,7 @@ function info() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=initiateCoinDozer&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636014459632&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=initiateCoinDozer&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636014459632&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
"Origin": "https://pushgold.jd.com",
@@ -139,7 +139,7 @@ function coinDozerBackFlow() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=coinDozerBackFlow&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015617899&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=coinDozerBackFlow&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015617899&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
@@ -180,7 +180,7 @@ function helpCoinDozer(packetId) {
return new Promise((resolve) => {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1636015855103&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20211104165055104;9806356985655163;10005;tk01wd1ed1d5f30nBDriGzaeVZZ9vuiX+cBzRLExSEzpfTriRD0nxU6BbRIOcSQvnfh74uInjSeb6i+VHpnHrBJdVwzs;017f330f7a84896d31a8d6017a1504dc16be8001273aaea9a04a8d04aad033d9`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1636015855103&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20211104165055104;9806356985655163;10005;tk01wd1ed1d5f30nBDriGzaeVZZ9vuiX+cBzRLExSEzpfTriRD0nxU6BbRIOcSQvnfh74uInjSeb6i+VHpnHrBJdVwzs;017f330f7a84896d31a8d6017a1504dc16be8001273aaea9a04a8d04aad033d9`,
headers: {
"Cookie": cookie,
@@ -220,7 +220,7 @@ function help(packetId) {
return new Promise((resolve) => {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`,
body: `functionId=helpCoinDozer&appid=station-soa-h5&client=H5&clientVersion=1.0.0&t=1623120183787&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s","packetId":"${packetId}","helperStatus":"0"}&_ste=1&_stk=appid,body,client,clientVersion,functionId,t&h5st=20210608104303790;8489907903583162;10005;tk01w89681aa9a8nZDdIanIyWnVuWFLK4gnqY+05WKcPY3NWU2dcfa73B7PBM7ufJEN0U+4MyHW5N2mT/RNMq72ycJxH;7e6b956f1a8a71b269a0038bbb4abd24bcfb834a88910818cf1bdfc55b7b96e5`,
headers: {
"Cookie": cookie,
@@ -268,7 +268,7 @@ function getCoinDozerInfo() {
const nm = {
url: `${JD_API_HOST}`,
body: `functionId=getCoinDozerInfo&body={"actId":"e6ad1ef1a55c440e9054e663be14e1d6","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015858295&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
body: `functionId=getCoinDozerInfo&body={"actId":"ccd0447255384f06ae26690993be27f1","channel":"coin_dozer","antiToken":"","referer":"-1","frontendInitStatus":"s"}&appid=megatron&client=ios&clientVersion=14.3&t=1636015858295&networkType=4g&eid=&fp=-1&frontendInitStatus=s&uuid=8888&osVersion=14.3&d_brand=&d_model=&agent=-1&pageClickKey=-1&screen=400*700&platform=3&lang=zh_CN`,
headers: {
"Cookie": cookie,
"Origin": "https://pushgold.jd.com",

9
jd_xm.js Executable file

File diff suppressed because one or more lines are too long