添加一个简单获取UA的方法
This commit is contained in:
@@ -145,9 +145,6 @@ cron "50 8 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd
|
||||
# 东东萌宠
|
||||
cron "15 6-18/6 * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js,tag=东东萌宠
|
||||
|
||||
# 聚宝盆投狗粮辅助
|
||||
http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js, requires-body=true, timeout=3600, tag=聚宝盆投狗粮辅助
|
||||
|
||||
# 金融养猪
|
||||
cron "12 * * * *" script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js, tag=京东金融养猪猪
|
||||
|
||||
|
@@ -12,8 +12,5 @@ https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-hea
|
||||
# 宠汪汪赛跑
|
||||
^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header https://gitee.com/lxk0301/jd_scripts/raw/master/jd_joy_run.js
|
||||
|
||||
# 聚宝盆投狗粮辅助
|
||||
^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox url script-response-body https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js
|
||||
|
||||
# 小米运动
|
||||
^https:\/\/account\.huami\.com\/v2\/client\/login url script-response-body https://gitee.com/lxk0301/jd_scripts/raw/master/backUp/xmSports.js
|
||||
|
33
README.md
33
README.md
@@ -77,23 +77,22 @@
|
||||
|45|[jd_nian_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_sign.js)|京东炸年兽签到任务🧨|京东app左侧浮动窗口|
|
||||
|46|[jd_nian_wechat.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_wechat.js)|京东炸年兽小程序🧨|京东小程序-炸年兽|
|
||||
|47|[jd_pet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js)|东东萌宠|京东APP我的-更多工具-东东萌宠|
|
||||
|48|[jd_petTreasureBox.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js)|聚宝盆投狗粮辅助|京东APP我的-更多工具-宠汪汪|
|
||||
|49|[jd_pigPet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js)|金融养猪|京东金融养猪猪|
|
||||
|50|[jd_plantBean.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js)|京东种豆得豆|京东APP我的-更多工具-种豆得豆|
|
||||
|51|[jd_rankingList.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_rankingList.js)|京东排行榜|京东APP首页-更多频道-排行榜-悬浮按钮|
|
||||
|52|[jd_redPacket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js)|京东全民开红包|京东APP首页-领券-锦鲤红包|
|
||||
|53|[jd_sgmh.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_sgmh.js)|闪购盲盒|京东APP首页-闪购-闪购盲盒|
|
||||
|54|[jd_shop.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_shop.js)|进店领豆|京东APP首页-领京豆-进店领豆|
|
||||
|55|[jd_small_home.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js)|东东小窝|京东APP我的-游戏与更多-东东小窝|
|
||||
|56|[jd_speed.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js)|✈️天天加速|京东APP我的-更多工具-天天加速|
|
||||
|57|[jd_super_box.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js)|京东超级盒子|[活动地址](https://prodev.m.jd.com/mall/active/21uMxFV5yiP4ivdSbmHqv5f2aXFK/index.html?tttparams=TiOY=woeyJnTG5nIjoiMTIwLjg3NTY0MSIsImdMYXQiOiIzMS4yODMxMzYifQ7==)|
|
||||
|58|[jd_superMarket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js)|东东超市|京东APP首页-京东超市-底部东东超市|
|
||||
|59|[jd_syj.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js)|赚京豆|赚京豆(微信小程序)-赚京豆-签到领京豆|
|
||||
|60|[jd_unbind.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js)|注销京东会员卡||
|
||||
|61|[jd_unsubscribe.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js)|取关京东店铺和商品||
|
||||
|62|[jd_xg.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xg.js)|小鸽有礼|[活动地址](https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0)|
|
||||
|63|[jd_xgyl.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xgyl.js)|小鸽有礼2|[活动地址](https://jingcai-h5.jd.com/#/dialTemplate?activityCode=1354740864131276800)|
|
||||
|64|[jx_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jx_sign.js)|京喜签到||
|
||||
|48|[jd_pigPet.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js)|金融养猪|京东金融养猪猪|
|
||||
|49|[jd_plantBean.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js)|京东种豆得豆|京东APP我的-更多工具-种豆得豆|
|
||||
|50|[jd_rankingList.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_rankingList.js)|京东排行榜|京东APP首页-更多频道-排行榜-悬浮按钮|
|
||||
|51|[jd_redPacket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js)|京东全民开红包|京东APP首页-领券-锦鲤红包|
|
||||
|52|[jd_sgmh.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_sgmh.js)|闪购盲盒|京东APP首页-闪购-闪购盲盒|
|
||||
|53|[jd_shop.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_shop.js)|进店领豆|京东APP首页-领京豆-进店领豆|
|
||||
|54|[jd_small_home.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_small_home.js)|东东小窝|京东APP我的-游戏与更多-东东小窝|
|
||||
|55|[jd_speed.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_speed.js)|✈️天天加速|京东APP我的-更多工具-天天加速|
|
||||
|56|[jd_super_box.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_super_box.js)|京东超级盒子|[活动地址](https://prodev.m.jd.com/mall/active/21uMxFV5yiP4ivdSbmHqv5f2aXFK/index.html?tttparams=TiOY=woeyJnTG5nIjoiMTIwLjg3NTY0MSIsImdMYXQiOiIzMS4yODMxMzYifQ7==)|
|
||||
|57|[jd_superMarket.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_superMarket.js)|东东超市|京东APP首页-京东超市-底部东东超市|
|
||||
|58|[jd_syj.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_syj.js)|赚京豆|赚京豆(微信小程序)-赚京豆-签到领京豆|
|
||||
|59|[jd_unbind.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unbind.js)|注销京东会员卡||
|
||||
|60|[jd_unsubscribe.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_unsubscribe.js)|取关京东店铺和商品||
|
||||
|61|[jd_xg.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xg.js)|小鸽有礼|[活动地址](https://snsdesign.jd.com/babelDiy/Zeus/4N5phvUAqZsGWBNGVJWmufXoBzpt/index.html?channel=lingsns003&scope=0&sceneid=9001&btnTips=&hideApp=0)|
|
||||
|62|[jd_xgyl.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jd_xgyl.js)|小鸽有礼2|[活动地址](https://jingcai-h5.jd.com/#/dialTemplate?activityCode=1354740864131276800)|
|
||||
|63|[jx_sign.js](https://gitee.com/lxk0301/jd_scripts/raw/master/jx_sign.js)|京喜签到||
|
||||
<!-- 清单标记结束 -->
|
||||
<!-- 此表格由 update_list.sh 脚本自动生成,请不要人工修改。 -->
|
||||
<!-- 这是隐藏信息,用来给 update_list.sh 脚本提供标记信息的,用于自动生成上面的脚本清单,请勿删除这里的标记信息。 -->
|
||||
|
@@ -54,7 +54,6 @@ crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=3600,scrip
|
||||
京东炸年兽签到任务🧨 = type=cron,cronexp="30 8 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_sign.js
|
||||
京东炸年兽小程序🧨 = type=cron,cronexp="50 8 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_nian_wechat.js
|
||||
东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pet.js
|
||||
聚宝盆投狗粮辅助 = type=http-response,pattern=^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox,requires-body=1,max-size=0,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_petTreasureBox.js
|
||||
京东金融养猪猪 = type=cron,cronexp="12 * * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_pigPet.js
|
||||
京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_plantBean.js
|
||||
京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=3600,script-path=https://gitee.com/lxk0301/jd_scripts/raw/master/jd_redPacket.js
|
||||
|
@@ -98,7 +98,7 @@ echo "删除原有docker_entrypoint.sh任务"
|
||||
sed -ie '/'docker_entrypoint.sh'/d' ${mergedListFile}
|
||||
|
||||
|
||||
current_min=$(date +%M)
|
||||
current_min=$(date +%-M)
|
||||
echo "当前分钟:${current_min}"
|
||||
|
||||
#当前分钟大于1,则随机一个小于当前分钟的,否则为59
|
||||
|
@@ -11,7 +11,7 @@
|
||||
| Name | 归属 | 属性 | 默认值 | 说明 |
|
||||
| :-------------: | :---------: | :----: | :----: | ------------------------------------------------------------ |
|
||||
| `JD_DEBUG` | 脚本打印log | 非必须 | true | 运行脚本时,是否显示log,默认显示。改成false表示不显示,注重隐私的人可以在设置secret -> `Name:JD_DEBUG,Value:false` |
|
||||
| `JD_USER_AGENT` | 京东 | 非必须 | | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。如需使用此功能建议填写京东APP的UA |
|
||||
| `JD_USER_AGENT` | 京东 | 非必须 | | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。如需使用此功能建议填写京东APP的UA,在京东聊天界面发送 https://www.ip138.com/useragent/ ,打开网址即可获得 |
|
||||
|
||||
##### 推送通知环境变量(目前提供`微信server酱`、`pushplus(推送加)`、`iOS Bark APP`、`telegram机器人`、`钉钉机器人`、`企业微信机器人`、`iGot`、`QQ酷推`等通知方式)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
| `FACTORAY_WANTPRODUCT_NAME` | 东东工厂<br>心仪商品 | 非必须 | 提供心仪商品名称(请尽量填写完整和别的商品有区分度),达到条件后兑换,<br>如不提供则会兑换当前所选商品 |
|
||||
| `JXNCTOKENS` | 京喜农场TOKEN | 非必须 | 每个账号 token 是一个 json,json 需要用单引号包裹且是一行字符串,<br>否则设置环境变量时会出错,示例:'{"farm_jstoken":"749a90f871adsfads8ffda7bf3b1576760",<br>"timestamp":"1610165423873",<br>"phoneid":"42c7e3dadfadsfdsaac-18f0e4f4a0cf"}',多账号间使用`&`或换行分开。 |
|
||||
| `JD_IMMORTAL_LATLON` | 京东神仙书院<br>地理位置变量 | 非必须 | 京东神仙书院地理位置,示例格式:{"lat":33.1, "lng":118.1} |
|
||||
| `JD_WECHAT_USER_AGENT` | 京东炸年兽<br>小程序<br>自定义UA | 非必须 | 强烈推荐使用自定义的小程序UA防止黑号,UA示例:<br>Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15A148 MicroMessenger/7.0.20(0x17001320) NetType/WIFI Language/zh_CN |
|
||||
| `JD_WECHAT_USER_AGENT` | 京东炸年兽<br>小程序<br>自定义UA | 非必须 | 强烈推荐使用自定义的小程序UA防止黑号,在微信聊天界面发送 https://www.ip138.com/useragent/ ,打开网址即可获得,UA示例:<br>Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15A148 MicroMessenger/7.0.20(0x17001320) NetType/WIFI Language/zh_CN |
|
||||
| `DREAMFACTORY_FORBID_ACCOUNT`| 京喜工厂<br>控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行京喜工厂脚本,注:输入`0`,代表全部账号不运行京喜工厂脚本 |
|
||||
| `JDFACTORY_FORBID_ACCOUNT`| 东东工厂<br>控制哪个京东账号不运行此脚本 | 非必须 | 输入`1`代表第一个京东账号不运行,多个使用`&`连接,例:`1&3`代表账号1和账号3不运行东东工厂脚本,注:输入`0`,代表全部账号不运行东东工厂脚本 |
|
||||
|
||||
|
2
jd_5g.js
2
jd_5g.js
@@ -746,7 +746,7 @@ function jsonParse(str) {
|
||||
}
|
||||
}
|
||||
}
|
||||
function updateShareCodes(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/jd_818.json') {
|
||||
function updateShareCodes(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_818.json') {
|
||||
return new Promise(resolve => {
|
||||
$.get({url,
|
||||
headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")}
|
||||
|
@@ -65,6 +65,7 @@ let helpCode = []
|
||||
return;
|
||||
}
|
||||
$.temp = [];
|
||||
await updateShareCodesCDN();
|
||||
for (let i = 0; i < cookiesArr.length; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i];
|
||||
@@ -589,7 +590,6 @@ async function doHelp() {
|
||||
}
|
||||
// await updateShareCodes();
|
||||
// if (!$.updatePkActivityIdRes) await updateShareCodesCDN();
|
||||
await updateShareCodesCDN();
|
||||
if ($.updatePkActivityIdRes && $.updatePkActivityIdRes['shareCodes']) tempCode = $.updatePkActivityIdRes['shareCodes'];
|
||||
console.log(`是否大于当天九点🕘:${nowTime > new Date(nowTime).setHours(9, 0, 0, 0)}`)
|
||||
//当天大于9:00才从API里面取收集的助力码
|
||||
@@ -858,10 +858,10 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/LXK9301/updat
|
||||
})
|
||||
})
|
||||
}
|
||||
function updateShareCodesCDN(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/jd_shareCodes.json') {
|
||||
function updateShareCodesCDN(url = 'https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_shareCodes.json') {
|
||||
return new Promise(resolve => {
|
||||
//https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_shareCodes.json
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
$.get({url , headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")}}, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
|
@@ -188,7 +188,7 @@ function getAuthorShareCode() {
|
||||
}
|
||||
function getAuthorShareCode2() {
|
||||
return new Promise(resolve => {
|
||||
$.get({url: "https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateBeanHome.json",headers:{
|
||||
$.get({url: "https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateBeanHome.json",headers:{
|
||||
"User-Agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1 Edg/87.0.4280.88"
|
||||
}}, async (err, resp, data) => {
|
||||
try {
|
||||
|
@@ -1373,7 +1373,7 @@ function shareCodesFormat() {
|
||||
}
|
||||
function requireConfig() {
|
||||
return new Promise(async resolve => {
|
||||
await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json');
|
||||
await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateFactoryTuanId.json');
|
||||
if ($.tuanIdS && $.tuanIdS.tuanActiveId) {
|
||||
tuanActiveId = $.tuanIdS.tuanActiveId;
|
||||
}
|
||||
|
@@ -53,7 +53,7 @@ const inviteCodes = [
|
||||
$.tuanList = []
|
||||
await requireConfig();
|
||||
if (helpAuthor) await getAuthorShareCode('https://gitee.com/shylocks/updateTeam/raw/main/jd_zz.json');
|
||||
if (helpAuthor) await getAuthorShareCode('https://gitee.com/lxk0301/updateTeam/raw/master/jd_zz.json');
|
||||
if (helpAuthor) await getAuthorShareCode('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_zz.json');
|
||||
if (!cookiesArr[0]) {
|
||||
$.msg($.name, '【提示】请先获取京东账号一cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"});
|
||||
return;
|
||||
|
@@ -336,6 +336,7 @@ function signIndex() {
|
||||
}
|
||||
function signEveryDay() {
|
||||
return new Promise(async (resolve) => {
|
||||
try {
|
||||
let signIndexRes = await signIndex();
|
||||
if (signIndexRes.resultCode === 0) {
|
||||
console.log(`每日签到条件查询:${signIndexRes.resultData.data.canSign === 2 ? '可以签到' : '已经签到过了'}`);
|
||||
@@ -352,7 +353,11 @@ function signEveryDay() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e);
|
||||
} finally {
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
function signOne(signDay) {
|
||||
|
@@ -49,8 +49,8 @@ if ($.isNode()) {
|
||||
}
|
||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||
const inviteCodes = [
|
||||
`ucp4UudBqMcbT-J9e_xx-UMQA96VZPICgwBY@oMZeX7Mco4wGBrBiNLAl-NqgPbNWoqjpA9BIHLl_7Z2uC4Bt@sM1uBLkXpYMbT64xe_w8_kRvuJH61i9EFx9HXw@oMZeXu5Nod1UAbY1ZrB4_Hors4ZLQ_-Owd64xO5a5HY66IcF`,
|
||||
`ucp4UudBqMcbT-J9e_xx-UMQA96VZPMNgwJW@oMZeX7Mco4wGBrBiNLAl-NqgPbNWoqjpA9BIHLl_7Z2uC4Bt@sM1uBLkXpYMbT64xe_w8_kRvuJH61i9EFx9HXw@oMZeXu5Nod1UAbY1ZrB4_Hors4ZLQ_-Owd64xO5a5HY66IcF`,
|
||||
`oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@vcZZM4U-2s49fLxMRfA8s9Ob_ZkZ7O0QtnrKtPOtbZhSjA@oMZeXOZOoY9eUOFiZrFxrKwAOXx25LYPCj8I_sDK6tbv4jls@oMZeXe9Kod0DCrE5M7Z1qcr4t7hsbJF9IrJMdgiso95xHVqC`,
|
||||
`oMZeX-5M9YkGAOtiP7Rz_yglorV31MmxRvuK5Itar4d2t7V2@oMZeXbBAqIJUAbA3ZrZ2rsve9AyA3Kq-6R23UrqYSIOwFRDm@vcZZM4U-2s49fLxMRfA8s9Ob_ZkZ7O0QtnrKtPOtbZhSjA@oMZeXOZOoY9eUOFiZrFxrKwAOXx25LYPCj8I_sDK6tbv4jls@oMZeXe9Kod0DCrE5M7Z1qcr4t7hsbJF9IrJMdgiso95xHVqC`,
|
||||
];
|
||||
!(async () => {
|
||||
await requireConfig();
|
||||
@@ -152,7 +152,7 @@ async function helpFriends() {
|
||||
if (!code) continue
|
||||
await helpFriend(code)
|
||||
if (!$.canHelp) return
|
||||
await $.wait(3000)
|
||||
await $.wait(4000)
|
||||
}
|
||||
}
|
||||
|
||||
|
60
jd_nian.js
60
jd_nian.js
@@ -46,8 +46,8 @@ if ($.isNode()) {
|
||||
}
|
||||
const JD_API_HOST = 'https://api.m.jd.com/client.action';
|
||||
const inviteCodes = [
|
||||
`cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZ9_MZ8gByP7FZ368dN8oTZBwGieaH5HvtnvXuK1Epn_KK8yol8OYGw7h3M2j_PxSZvYA`,
|
||||
`cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIumO4w2cDgSqvYcqHwjaAzLxu0S371Dh_fctFJtN0tXYzdR7JaY`
|
||||
`cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs`,
|
||||
`cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0@cgxZdTXtIL-L7FzMAQCqvap-CydslPKkAn5-YquhVOdq2fHQPxbVJ4pskHs`
|
||||
];
|
||||
const pkInviteCodes = [
|
||||
'IgNWdiLGaPadvlqJQnnKp27-YpAvKvSYNTSkTGvZylf_0wcvqD9EMkohENk@IgNWdiLGaPaZskfACQyhgLSpZWps-WtQEW3McibT@IgNWdiLGaPaAvmHPAQf769XqjJjMyRirPzN9-AS-WHY9Y_G7t9Cwe5gdiI2qEvDf@IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hJTS2SQzU0vulL0fHeULJaIfgqHFd7f_a0 @IgNWdiLGaPYCeJUfsq18UNi5ln9xEZSPRdOue8Wl3hLRjZBAJLHzBpcl18AeskNYctp_9A',
|
||||
@@ -344,7 +344,7 @@ function getHomeData(info = false) {
|
||||
$.secretp = null
|
||||
return
|
||||
}
|
||||
console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨`)
|
||||
console.log(`\n\n当前等级:${$.userInfo.raiseInfo.curMaxLevel}\n当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore - $.userInfo.raiseInfo.curLevelStartScore}🧨\n\n`)
|
||||
|
||||
if (info) {
|
||||
message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n`
|
||||
@@ -619,7 +619,7 @@ function getTaskList(body = {}) {
|
||||
if (data.data.bizCode === 0) {
|
||||
if (JSON.stringify(body) === "{}") {
|
||||
$.taskVos = data.data.result.taskVos;//任务列表
|
||||
console.log(`您的好友助力码为${data.data.result.inviteId}`)
|
||||
console.log(`\n\n您的好友助力码为${data.data.result.inviteId}\n\n`)
|
||||
}
|
||||
// $.userInfo = data.data.result.userInfo;
|
||||
}
|
||||
@@ -838,7 +838,7 @@ function pkInfo() {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data.code === 0 && data.data && data.data.bizCode === 0) {
|
||||
console.log(`\n您的好友PK助力码为${data.data.result.groupInfo.groupAssistInviteId}\n注:此pk邀请码每天都变!`)
|
||||
console.log(`\n\n您的好友PK助力码为${data.data.result.groupInfo.groupAssistInviteId}\n注:此pk邀请码每天都变!\n\n`)
|
||||
let info = data.data.result.groupPkInfo
|
||||
console.log(`预计分得:${data.data.result.groupInfo.personalAward}红包`)
|
||||
if (info.dayAward)
|
||||
@@ -1170,7 +1170,8 @@ function getSpecialGiftInfo() {
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
if (data && data.data['bizCode'] === 0) {
|
||||
console.log(`领奖成功,获得${data.data.result.score}爆竹🧨`)
|
||||
await collectSpecialFinalScore()
|
||||
// console.log(`领奖成功,获得${data.data.result.score}爆竹🧨`)
|
||||
}else{
|
||||
console.log(data.data.bizMsg)
|
||||
}
|
||||
@@ -1243,6 +1244,53 @@ function collectSpecialScore(taskId, itemId, actionType = null, inviteId = null,
|
||||
})
|
||||
}
|
||||
|
||||
function collectSpecialFinalScore() {
|
||||
let temp = {
|
||||
"ic": 1,
|
||||
"rnd": getRnd(),
|
||||
"inviteId": "-1",
|
||||
"stealId": "-1"
|
||||
}
|
||||
const extraData = {
|
||||
"jj": 6,
|
||||
"buttonid": "jmdd-react-smash_0",
|
||||
"sceneid": "homePageh5",
|
||||
"appid": '50073'
|
||||
}
|
||||
let body = {
|
||||
...encode(temp, $.secretp, extraData),
|
||||
"ic" : 1,
|
||||
}
|
||||
return new Promise(resolve => {
|
||||
$.post(taskPostUrl("nian_collectSpecialGift", body, "nian_collectSpecialGift"), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
if (safeGet(data)) {
|
||||
data = JSON.parse(data);
|
||||
if (data.code === 0) {
|
||||
if (data.data && data.data.bizCode === 0) {
|
||||
if (data.data.result && data.data.result.collectInfo && data.data.result.collectInfo.score)
|
||||
console.log(`任务完成,获得${data.data.result.collectInfo.score}爆竹🧨`)
|
||||
else
|
||||
console.log(JSON.stringify(data))
|
||||
// $.userInfo = data.data.result.userInfo;
|
||||
} else {
|
||||
console.log(data.data.bizMsg)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp)
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
function readShareCode() {
|
||||
console.log(`开始`)
|
||||
return new Promise(async resolve => {
|
||||
|
@@ -88,6 +88,7 @@ const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api';
|
||||
await smallHome();
|
||||
}
|
||||
}
|
||||
await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/shareCodes/jd_updateSmallHomeInviteCode.json');
|
||||
for (let i = 0; i < cookiesArr.length; i++) {
|
||||
if (cookiesArr[i]) {
|
||||
cookie = cookiesArr[i];
|
||||
@@ -148,9 +149,8 @@ async function doChannelsListTask(taskId, taskType) {
|
||||
}
|
||||
}
|
||||
async function helpFriends() {
|
||||
await updateInviteCode();
|
||||
// await updateInviteCode();
|
||||
// if (!$.inviteCodes) await updateInviteCodeCDN();
|
||||
await updateInviteCodeCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateSmallHomeInviteCode.json');
|
||||
if ($.inviteCodes && $.inviteCodes['inviteCode']) {
|
||||
for (let item of $.inviteCodes.inviteCode) {
|
||||
if (!item) continue
|
||||
@@ -806,7 +806,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/LXK9301/updat
|
||||
}
|
||||
function updateInviteCodeCDN(url) {
|
||||
return new Promise(async resolve => {
|
||||
$.get({url}, async (err, resp, data) => {
|
||||
$.get({url, headers:{"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0")}}, async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
|
Reference in New Issue
Block a user