add UA,fix jd_joy_steal.js

This commit is contained in:
lxk0301
2021-01-21 09:22:03 +08:00
parent 58b288b133
commit 28f50061ae
2 changed files with 24 additions and 12 deletions

View File

@@ -1,22 +1,29 @@
/*
* @Author: LXK9301 https://github.com/LXK9301
* @Date: 2020-07-16 18:54:16
* @Last Modified by: LXK9301
* @Last Modified time: 2021-1-21 21:22:37
*/
/*
最近经常出现给偷好友积分与狗粮失败的情况故建议cron设置为多次
jd宠汪汪偷好友积分与狗粮,及给好友喂食
偷好友积分上限是20个好友(即获得100积分)帮好友喂食上限是20个好友(即获得200积分)偷好友狗粮上限也是20个好友(最多获得120g狗粮)
IOS用户支持京东双账号,NodeJs用户支持N个京东账号
脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js
更新时间:2021-1-17
如果开启了给好友喂食功能建议先凌晨0点运行jd_joy.js脚本获取狗粮后再运行此脚本(jd_joy_steal.js)可偷好友积分6点运行可偷好友狗粮
如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save
==========Quantumult X==========
[task_local]
#宠汪汪偷好友积分与狗粮
0 0-10/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
=======Loon========
[Script]
cron "0 0-10/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮
========Surge==========
宠汪汪偷好友积分与狗粮 = type=cron,cronexp="0 0-10/2 * * *",wake-system=1,timeout=2200,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js
=======小火箭=====
宠汪汪偷好友积分与狗粮 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js, cronexpr="0 0-10/2 * * *", timeout=2200, enable=true
*/
// quantumultx
// [task_local]
// #宠汪汪偷好友积分与狗粮
// 0 0-10/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
// Loon
// [Script]
// cron "0 0-10/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮
// Surge
// 宠汪汪偷好友积分与狗粮 = type=cron,cronexp="0 0-10/2 * * *",wake-system=1,timeout=320,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js
const $ = new Env('宠汪汪偷好友积分与狗粮');
const notify = $.isNode() ? require('./sendNotify') : '';
//Node.js用户请在jdCookie.js处填写京东ck;
@@ -104,6 +111,8 @@ async function jdJoySteal() {
$.helpFood = 0;
$.stealFriendCoin = 0;
$.stealFood = 0;
$.stealStatus = null;
$.helpFeedStatus = null;
message += `【京东账号${$.index}${$.nickName}\n`;
await getFriends();//查询是否有好友
await getCoinChanges();//查询喂食好友和偷好友积分是否已达上限