mirror of
https://github.com/okyyds/yyds.git
synced 2026-07-13 02:21:18 +08:00
Compare commits
18 Commits
ddb2b022cf
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8cd038ce72 | ||
|
|
d89392d8a5 | ||
|
|
685591c208 | ||
|
|
59569ea66c | ||
|
|
857bb0cacd | ||
|
|
c5b865f786 | ||
|
|
cd00939dc9 | ||
|
|
86c88bbe84 | ||
|
|
73adc5865a | ||
|
|
89a7cd8d68 | ||
|
|
7084b6c3c6 | ||
|
|
cae8dfdd18 | ||
|
|
9a063e6ef3 | ||
|
|
2d7605fd25 | ||
|
|
d912fcd73d | ||
|
|
b6fc59e1d7 | ||
|
|
1b18295358 | ||
|
|
360d6175e3 |
7
jd_lzdz1.js
Normal file
7
jd_lzdz1.js
Normal file
File diff suppressed because one or more lines are too long
@@ -3,16 +3,16 @@
|
|||||||
开卡延迟,默认 4000
|
开卡延迟,默认 4000
|
||||||
opencard_delayTime
|
opencard_delayTime
|
||||||
*/
|
*/
|
||||||
const $ = new Env("双旦狂欢购 好物大联盟");
|
const $ = new Env("喜乐元宵,欢聚好礼");
|
||||||
const jdCookieNode = $.isNode() ? require("./jdCookie.js") : "";
|
const jdCookieNode = $.isNode() ? require("./jdCookie.js") : "";
|
||||||
const notify = $.isNode() ? require("./sendNotify") : "";
|
const notify = $.isNode() ? require("./sendNotify") : "";
|
||||||
let cookiesArr = [], cookie = "", message = "";
|
let cookiesArr = [], cookie = "", message = "";
|
||||||
let delayTime = process.env.opencard_delayTime ?? 4000;
|
let delayTime = process.env.opencard_delayTime ?? 4000;
|
||||||
let ownCode = null;
|
let ownCode = null;
|
||||||
let authorCodeList = [
|
let authorCodeList = [
|
||||||
'2522db8a3d25405a8fa481bf4b0430f7',
|
'bec8b5a1302d4cd1aad18f2146ab44e7',
|
||||||
];
|
];
|
||||||
let activityId = '5fe4ab7165224fa8bf4dcbb4ebe8fa83'
|
let activityId = '6c0d1b3954db48299de4b0ad4096a037'
|
||||||
if ($.isNode()) {
|
if ($.isNode()) {
|
||||||
Object.keys(jdCookieNode).forEach((item) => {
|
Object.keys(jdCookieNode).forEach((item) => {
|
||||||
cookiesArr.push(jdCookieNode[item]);
|
cookiesArr.push(jdCookieNode[item]);
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -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;
|
|
||||||
}
|
|
||||||
|
|
||||||
2079
jd_rednhj.js
2079
jd_rednhj.js
File diff suppressed because one or more lines are too long
10
jd_tyt.js
10
jd_tyt.js
@@ -96,7 +96,7 @@ function info() {
|
|||||||
|
|
||||||
const nm = {
|
const nm = {
|
||||||
url: `${JD_API_HOST}`,
|
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: {
|
headers: {
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
"Origin": "https://pushgold.jd.com",
|
"Origin": "https://pushgold.jd.com",
|
||||||
@@ -139,7 +139,7 @@ function coinDozerBackFlow() {
|
|||||||
|
|
||||||
const nm = {
|
const nm = {
|
||||||
url: `${JD_API_HOST}`,
|
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: {
|
headers: {
|
||||||
|
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
@@ -180,7 +180,7 @@ function helpCoinDozer(packetId) {
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const nm = {
|
const nm = {
|
||||||
url: `${JD_API_HOST}`,
|
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: {
|
headers: {
|
||||||
|
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
@@ -220,7 +220,7 @@ function help(packetId) {
|
|||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
const nm = {
|
const nm = {
|
||||||
url: `${JD_API_HOST}`,
|
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: {
|
headers: {
|
||||||
|
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
@@ -268,7 +268,7 @@ function getCoinDozerInfo() {
|
|||||||
|
|
||||||
const nm = {
|
const nm = {
|
||||||
url: `${JD_API_HOST}`,
|
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: {
|
headers: {
|
||||||
"Cookie": cookie,
|
"Cookie": cookie,
|
||||||
"Origin": "https://pushgold.jd.com",
|
"Origin": "https://pushgold.jd.com",
|
||||||
|
|||||||
Reference in New Issue
Block a user