diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml new file mode 100644 index 00000000..7f115288 --- /dev/null +++ b/.github/workflows/docker_build.yml @@ -0,0 +1,33 @@ +name: 构建JD Scripts镜像 +on: + #防止fork乱用action设置只能手动触发构建 + workflow_dispatch: + +jobs: + build-and-push: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: 构建并推送到Dockerhub镜像仓库 + uses: docker/build-push-action@v2 + with: + context: . + file: ./docker/Dockerfile + platforms: linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 + push: true + tags: | + lxk0301/jd_scripts:latest diff --git a/.github/workflows/repo_sync.yml b/.github/workflows/repo_sync.yml index 2a40c3af..31a37eb9 100644 --- a/.github/workflows/repo_sync.yml +++ b/.github/workflows/repo_sync.yml @@ -1,5 +1,5 @@ # File: .github/workflows/repo-sync.yml -name: sync-lxk0301-scripts +name: sync-LXK9301-scripts on: schedule: - cron: '1 0,15 * * *' @@ -9,7 +9,7 @@ on: push: branches: [ master ] repository_dispatch: - types: sync-lxk0301-scripts + types: sync-LXK9301-scripts jobs: repo-sync: env: @@ -22,11 +22,11 @@ jobs: with: persist-credentials: false - - name: sync lxk0301-scripts + - name: sync LXK9301-scripts uses: repo-sync/github-sync@v2 if: env.PAT with: - source_repo: "https://github.com/lxk0301/jd_scripts.git" + source_repo: "https://github.com/LXK9301/jd_scripts.git" source_branch: "master" destination_branch: "master" github_token: ${{ secrets.PAT }} @@ -35,7 +35,7 @@ jobs: uses: Yikun/hub-mirror-action@master if: env.dst_key with: - src: github/lxk0301 + src: github/LXK9301 dst: gitee/lxk0301 static_list: "jd_scripts" dst_key: ${{ secrets.GITEE_PRIVATE_KEY }} diff --git a/JD_extra_cookie.js b/JD_extra_cookie.js index 504eda2d..e0a69f1b 100644 --- a/JD_extra_cookie.js +++ b/JD_extra_cookie.js @@ -21,13 +21,13 @@ hostname = wq.jd.com 【Surge脚本配置】: =================== [Script] -获取京东Cookie = type=http-request,pattern=^https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js,script-update-interval=0 +获取京东Cookie = type=http-request,pattern=^https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js,script-update-interval=0 =================== 【Loon脚本配置】: =================== [Script] -http-request https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion tag=获取京东Cookie, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js +http-request https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion tag=获取京东Cookie, script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js =================== @@ -35,7 +35,7 @@ http-request https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion tag=获 =================== [rewrite_local] -https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js +https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-header https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js */ diff --git a/Loon/lxk0301_LoonTask.conf b/Loon/lxk0301_LoonTask.conf index 712c0570..625416d1 100644 --- a/Loon/lxk0301_LoonTask.conf +++ b/Loon/lxk0301_LoonTask.conf @@ -1,125 +1,135 @@ -# Loon软件Task配置 By lxk0301 -# GitHub主页(https://github.com/lxk0301/jd_scripts) +# Loon软件Task配置 By LXK9301 +# GitHub主页(https://github.com/LXK9301/jd_scripts) # TG讨论组 (https://t.me/JD_fruit_pet) # TG通知频道 (https://t.me/jdfruit) -# Loon的Task脚本订阅链接: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Loon/lxk0301_LoonTask.conf -# 使用方法:打开APP,顶部的配置 -> 脚本 -> 订阅脚本- > 点击右上角+号 -> 添加url链接 (https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Loon/lxk0301_LoonTask.conf) +# Loon的Task脚本订阅链接: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Loon/lxk0301_LoonTask.conf +# 使用方法:打开APP,顶部的配置 -> 脚本 -> 订阅脚本- > 点击右上角+号 -> 添加url链接 (https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Loon/lxk0301_LoonTask.conf) hostname = api.m.jd.com, draw.jdfcloud.com, jdjoy.jd.com, account.huami.com # 东东农场 -cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,tag=东东农场 +cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js,tag=东东农场 # 东东萌宠 -cron "10 7-19/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,tag=东东萌宠 +cron "10 7-19/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js,tag=东东萌宠 # 京东种豆得豆 -cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 +cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 # 宠汪汪(主要是日常任务,不过里面也有喂食和领取三餐狗粮) -cron "15 1,7,9,12,18,21 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js,tag=宠汪汪 +cron "15 1,7,9,12,18,21 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js,tag=宠汪汪 # 宠汪汪喂食 -cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js,tag=宠汪汪喂食 +cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js,tag=宠汪汪喂食 # 宠汪汪偷好友积分与狗粮 -cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 +cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 # 宠汪汪积分兑换奖品 -cron "0 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品 +cron "0 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品 # 京东天天加速 -cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js,tag=京东天天加速 +cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js,tag=京东天天加速 # 京东摇钱树 -cron "3 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js,tag=京东摇钱树 +cron "3 */5 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js,tag=京东摇钱树 # 京小超 -cron "11 1-23/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,tag=京小超 +cron "11 1-23/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js,tag=京小超 # 京小超兑换奖品 -cron "0,30 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品 +cron "0,30 0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品 # 取关京东店铺商品 -cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品 +cron "55 23 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品 # 进店领豆 -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js,tag=进店领豆 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js,tag=进店领豆 #摇京豆 -cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js,tag=摇京豆 +cron "5 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js,tag=摇京豆 #京东全民开红包 -cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 +cron "1 1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 #京豆变动通知 -cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知 +cron "2 9 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知 #点点券 -cron "20 0,20 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, tag=点点券 +cron "20 0,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js, tag=点点券 #十元街 -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街 #东东小窝 -cron "16 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝 +cron "16 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝 #京喜工厂 -cron "26 * * * *" script-path= https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂 +cron "26 * * * *" script-path= https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂 #东东工厂 -cron "10 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js,tag=东东工厂 +cron "10 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js,tag=东东工厂 #宠汪汪邀请助力与赛跑助力 -cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 +cron "15 10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 #小米运动 -cron "25 17 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动 +cron "25 17 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, tag=小米运动 #宠汪汪助力更新Token -http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token +http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token #宠汪汪助力获取Token -http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token +http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token # 宠汪汪强制为别人助力 -http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js, requires-body=true, timeout=10, tag=宠汪汪强制为别人助力 +http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js, requires-body=true, timeout=10, tag=宠汪汪强制为别人助力 #聚宝盆投狗粮辅助(github@Zero-S1搬的) -http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/getPetTreasureBox script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js, requires-body=true, timeout=10, tag=聚宝盆投狗粮辅助 +http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/getPetTreasureBox script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js, requires-body=true, timeout=10, tag=聚宝盆投狗粮辅助 # 小米运动获取Token -http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token +http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token # 京东代属 -# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属 +# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js, tag=京东代属 # 京东快递 -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, tag=京东快递签到 # 京东汽车 -cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车 +cron "0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, tag=京东汽车 # 领京豆额外奖励 -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励 # 京东健康 -#cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康 +#cron "3 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdh.js,tag=京东健康 # 京东赚赚 -cron "10 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚 +cron "10 11 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚 # 京东秒杀红包雨 -# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨 +# cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨 #注销京东店铺会员卡 -cron "23 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡 +cron "23 12 * * 6" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡 # 京东直播 -cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播 +cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js, tag=京东直播 # 京东看一看 -# cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看 +# cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_watch.js, tag=京东看一看 #直播红包雨 -# cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨 +# cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨 # 金融打卡领年终奖 -# cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖 +# cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖 # 健康抽奖机 -#cron "10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机 +#cron "10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_health.js,tag=健康抽奖机 # 疯狂的joy日常任务 -cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务 +cron "30 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js,tag=疯狂的joy日常任务 +#京喜签到 +cron "5 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js,tag=京喜签到 +#京东汽车兑换 +cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换 +#京东家庭号 +cron "11 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js,tag=京东家庭号 +#口袋书店 +cron "1 8,12,18 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js, tag=口袋书店 +#京东年货节 +cron "1 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js,tag=京东年货节 diff --git a/QuantumultX/lxk0301_gallery.json b/QuantumultX/lxk0301_gallery.json index 2dab7cc8..0f174d4a 100644 --- a/QuantumultX/lxk0301_gallery.json +++ b/QuantumultX/lxk0301_gallery.json @@ -1,41 +1,41 @@ { - "name": "lxk0301 task gallery", - "description": "https://github.com/lxk0301/jd_scripts", + "name": "LXK9301 task gallery", + "description": "https://github.com/LXK9301/jd_scripts", "task": [ - "5 6-18/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js, tag=东东农场 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png", - "20 7-19/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js, tag=东东萌宠 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png", - "10 7-21/2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js, tag=京东种豆得豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png", - "15 1,7,9,12,18,21 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js, tag=宠汪汪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", - "12 */1 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js, tag=宠汪汪喂食 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", - "0 0,6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", - "1 0,8,12,16 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js , tag=宠汪汪积分兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", - "8 */3 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js , tag=京东天天加速 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png", - "15 */5 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js , tag=京东摇钱树 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png", - "5 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js , tag=摇京豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png", - "11 1-23/5 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js , tag=京小超 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png", - "0,30 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js , tag=京小超兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png", - "55 23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js , tag=取关京东店铺商品 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js , tag=进店领豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png", - "15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js , tag=宠汪汪邀请助力与赛跑助力 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", - "1 1 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js , tag=京东全民开红包 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", - "2 9 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js , tag=京豆变动通知 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "20 0,20 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js , tag=点点券 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png", - "13 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://github.com/58xinian/icon/raw/master/ddxw.png", - "10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png", - "0 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://github.com/58xinian/icon/raw/master/jd_syj.png", - "10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png", - "0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_car.png", - "10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png", - "10-20/5 12 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png", - "14 11 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png", - "44 12 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png", - "30 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "15 17 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png", - "0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", - "0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js, tag=口袋书店, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "5 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js, tag=京喜签到, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "2 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js, tag=签到领现金, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", - "1 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_nh.js, tag=京东年货节, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png" + "5 6-18/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js, tag=东东农场 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png", + "20 7-19/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js, tag=东东萌宠 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png", + "10 7-21/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, tag=京东种豆得豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png", + "15 1,7,9,12,18,21 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js, tag=宠汪汪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", + "12 */1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js, tag=宠汪汪喂食 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", + "0 0,6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", + "1 0,8,12,16 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js , tag=宠汪汪积分兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", + "8 */3 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js , tag=京东天天加速 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png", + "15 */5 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js , tag=京东摇钱树 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png", + "5 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js , tag=摇京豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png", + "11 1-23/5 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js , tag=京小超 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png", + "0,30 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js , tag=京小超兑换奖品 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png", + "55 23 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js , tag=取关京东店铺商品 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js , tag=进店领豆 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png", + "15 10 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js , tag=宠汪汪邀请助力与赛跑助力 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png", + "1 1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js , tag=京东全民开红包 , img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", + "2 9 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js , tag=京豆变动通知 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "20 0,20 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js , tag=点点券 , img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "10 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png", + "13 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://github.com/58xinian/icon/raw/master/ddxw.png", + "10 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js, tag=东东工厂, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png", + "0 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://github.com/58xinian/icon/raw/master/jd_syj.png", + "10 6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png", + "0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_car.png", + "10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png", + "10-20/5 12 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js, tag=京东直播, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png", + "14 11 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png", + "44 12 * * 6 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js, tag=注销京东店铺会员卡, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png", + "30 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "15 17 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png", + "0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", + "0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js, tag=口袋书店, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "5 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js, tag=京喜签到, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "2 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js, tag=签到领现金, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", + "1 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js, tag=京东年货节, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png" ] } diff --git a/README.md b/README.md index a9e89ace..6dd31876 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# 不要fork! 请点亮Star +## 请勿使用github action、滥用github资源会封我仓库以及账号,[详见](https://github.com/LXK9301/jd_scripts/issues/3) ## 特别声明: @@ -6,84 +6,83 @@ * 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。 -* lxk0301对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害. +* LXK9301对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害. -* 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, lxk0301 对于由此引起的任何隐私泄漏或其他后果概不负责. +* 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, LXK9301 对于由此引起的任何隐私泄漏或其他后果概不负责. * 请勿将Script项目的任何内容用于商业或非法目的,否则后果自负. * 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本. -* 任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。lxk0301 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明. +* 任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。LXK9301 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明. **您必须在下载后的24小时内从计算机或手机中完全删除以上内容.**
> ***您使用或者复制了本仓库且本人制作的任何脚本,则视为`已接受`此声明,请仔细阅读*** ## Script脚本列表 #### 说明 -1. 其中 [jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_sign.js) 可N个京东账号,Node.js专用,核心脚本是JD_DailyBonus.js, IOS软件用户请使用NobyDa的 [JD_DailyBonus.js](https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js) +1. 其中 [jd_bean_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_sign.js) 可N个京东账号,Node.js专用,核心脚本是JD_DailyBonus.js, IOS软件用户请使用NobyDa的 [JD_DailyBonus.js](https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js) 2. 以字母排序。 | 活动时长 | 名称 | 脚本 | | -------- | --------------------------------- | -------------------------------------------------------------------------------------------------------- | -| 长期 | 京豆变动通知 | [jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js) | -| 长期 | 领京豆额外奖励&抢京豆 | [jd_bean_home.js](https://raw.githubusercontent.com/lxk0302/jd_scripts/master/jd_bean_home.js) | -| 长期 | 京东多合一签到 | [jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_sign.js) | -| 长期 | 东东超市兑换奖品 | [jd_blueCoin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js) | -| 长期 | 口袋书店 | [jd_bookshop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js) | -| 长期 | 京东汽车赛点兑换京豆 | [jd_car_exchange.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js) | -| 长期 | 签到领现金 | [jd_cash.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js) | -| 长期 | 京东汽车签到 | [jd_car.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js) | -| 长期 | 摇京豆 | [jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js) | -| 长期 | 疯狂的JOY挂机 | [jd_crazy_joy_coin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js) | -| 长期 | 疯狂的JOY日常任务 | [jd_crazy_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js) | -| 长期 | 京东金融-天天提鹅 | [jd_daily_egg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_daily_egg.js) | -| 长期 | 京喜工厂 | [jd_dreamFactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js) | -| 长期 | 东东农场 | [jd_fruit.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js) | -| 长期 | 宠汪汪 | [jd_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js) | -| 长期 | 获取所有互助码 | [jd_get_share_code.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js) | -| 长期 | 东东工厂 | [jd_jdfactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js) | -| 长期 | 京东赚赚 | [jd_jdzz.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js) | -| 长期 | 宠汪汪单独喂食 | [jd_joy_feedPets.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js) | -| 长期 | 宠汪汪强制为好友助力(iOS端专用) | [jd_joy_help.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js) | -| 长期 | 宠汪汪聚宝盆辅助脚本(iOS端专用) | [jd_petTreasureBox.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js) | -| 长期 | 宠汪汪兑换奖品 | [jd_joy_reward.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js) | -| 长期 | 宠汪汪赛跑助力 | [jd_joy_run.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js) | -| 长期 | 宠汪汪偷好友狗粮与积分 | [jd_joy_steal.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js) | -| 长期 | 宠汪汪 | [jd_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js) | -| 长期 | 京喜农场 | [jd_jxnc.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js) | -| 长期 | 京东快递签到 | [jd_kd.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js) | -| 长期 | 京东直播 | [jd_live.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js) | -| 长期 | 京东抽奖机 | [jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js) | -| 长期 | 摇钱树 | [jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js) | -| 长期 | 点点券 | [jd_necklace.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js) | -| 长期 | 东东萌宠 | [jd_pet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js) | -| 长期 | 金融养猪 | [jd_pigPet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pigPet.js) | -| 长期 | 种豆得豆 | [jd_plantBean.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js) | -| 长期 | 京东排行榜签到得京豆 | [jd_rankingList.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_rankingList.js) | -| 长期 | 全民开红包 | [jd_redPacket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js) | -| 长期 | 进店领豆 | [jd_shop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js) | -| 长期 | 东东小窝 | [jd_small_home.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js) | -| 长期 | 天天加速 | [jd_speed.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js) | -| 长期 | 东东超市 | [jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js) | -| 长期 | 十元街 | [jd_syj.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js) | -| 长期 | 注销京东会员卡 | [jd_unbind.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js) | -| 长期 | 取关京东店铺和商品 | [jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js) | -| 长期 | 京喜签到 | [jx_sign.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js) | +| 长期 | 京豆变动通知 | [jd_bean_change.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js) | +| 长期 | 领京豆额外奖励&抢京豆 | [jd_bean_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js) | +| 长期 | 京东多合一签到 | [jd_bean_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_sign.js) | +| 长期 | 东东超市兑换奖品 | [jd_blueCoin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js) | +| 长期 | 口袋书店 | [jd_bookshop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js) | +| 长期 | 京东汽车赛点兑换京豆 | [jd_car_exchange.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js) | +| 长期 | 签到领现金 | [jd_cash.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js) | +| 长期 | 京东汽车签到 | [jd_car.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js) | +| 长期 | 摇京豆 | [jd_club_lottery.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js) | +| 长期 | 疯狂的JOY挂机 | [jd_crazy_joy_coin.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js) | +| 长期 | 疯狂的JOY日常任务 | [jd_crazy_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js) | +| 长期 | 京东金融-天天提鹅 | [jd_daily_egg.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_daily_egg.js) | +| 长期 | 京喜工厂 | [jd_dreamFactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js) | +| 长期 | 东东农场 | [jd_fruit.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js) | +| 长期 | 宠汪汪 | [jd_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js) | +| 长期 | 获取所有互助码 | [jd_get_share_code.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js) | +| 长期 | 东东工厂 | [jd_jdfactory.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js) | +| 长期 | 京东赚赚 | [jd_jdzz.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js) | +| 长期 | 宠汪汪单独喂食 | [jd_joy_feedPets.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js) | +| 长期 | 宠汪汪强制为好友助力(iOS端专用) | [jd_joy_help.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js) | +| 长期 | 宠汪汪聚宝盆辅助脚本(iOS端专用) | [jd_petTreasureBox.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js) | +| 长期 | 宠汪汪兑换奖品 | [jd_joy_reward.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js) | +| 长期 | 宠汪汪赛跑助力 | [jd_joy_run.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js) | +| 长期 | 宠汪汪偷好友狗粮与积分 | [jd_joy_steal.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js) | +| 长期 | 宠汪汪 | [jd_joy.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js) | +| 长期 | 京喜农场 | [jd_jxnc.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js) | +| 长期 | 京东快递签到 | [jd_kd.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js) | +| 长期 | 京东直播 | [jd_live.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js) | +| 长期 | 京东抽奖机 | [jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js) | +| 长期 | 摇钱树 | [jd_moneyTree.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js) | +| 长期 | 点点券 | [jd_necklace.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js) | +| 长期 | 东东萌宠 | [jd_pet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js) | +| 长期 | 金融养猪 | [jd_pigPet.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pigPet.js) | +| 长期 | 种豆得豆 | [jd_plantBean.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js) | +| 长期 | 京东排行榜签到得京豆 | [jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js) | +| 长期 | 全民开红包 | [jd_redPacket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js) | +| 长期 | 进店领豆 | [jd_shop.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js) | +| 长期 | 东东小窝 | [jd_small_home.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js) | +| 长期 | 天天加速 | [jd_speed.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js) | +| 长期 | 东东超市 | [jd_superMarket.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js) | +| 长期 | 十元街 | [jd_syj.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js) | +| 长期 | 注销京东会员卡 | [jd_unbind.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js) | +| 长期 | 取关京东店铺和商品 | [jd_unsubscribe.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js) | +| 长期 | 京喜签到 | [jx_sign.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js) | 搬运脚本 -1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js)) -2. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东排行榜([jd_rankingList.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_rankingList.js)) +1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_lotteryMachine.js)) +2. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东排行榜([jd_rankingList.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_rankingList.js)) **脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js** **TODO** - [x] 所有活动互助码在一个脚本打印 -- [ ] 京喜工厂添加预测N天后可兑换功能 ## 邀请码互助 - - [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions) - - [获取各类活动互助码脚本 jd_get_share_code.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js) + - [邀请码互助入口](https://github.com/LXK9301/jd_scripts/discussions) + - [获取各类活动互助码脚本 jd_get_share_code.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js) - [邀请码使用规范](githubAction.md#互助码类环境变量)(仅限云端) ## 食用方法 @@ -96,38 +95,26 @@ 2. Android 3. MacOS - -### 方法二:云服务器、腾讯云函数等等 - - - 需自行有云服务器,云函数等 - - 腾讯云云函数 [快速部署教程](./backUp/tencentscf.md)(免费) - - 腾讯云云函数控制台使用 [教程说明](./backUp/iCloud.md) - - 腾讯云云函数 [GitHub Action部署教程](./backUp/tencentscf.md#github-action-部署) - -### 方法三:Docker(NAS或VPS用户) +### 方法二:Docker(NAS或VPS用户) - - 可以精确控制任务运行时间,有二种办法:[docker办法一](https://github.com/lxk0301/jd_scripts/tree/master/docker)、[docker办法二(和本地安装Node.js类似)](https://github.com/EvineDeng/jd-base) - - [环境变量集合](https://github.com/lxk0301/jd_scripts/blob/master/githubAction.md) + - 可以精确控制任务运行时间,有二种办法:[docker办法一](https://github.com/LXK9301/jd_scripts/tree/master/docker)、[docker办法二(和本地安装Node.js类似)](https://github.com/EvineDeng/jd-base) + - [环境变量集合](https://github.com/LXK9301/jd_scripts/blob/master/githubAction.md) -#### 注:以上三种运行机制都是Node.js,故您需仔细阅读下面几点 +#### 注:以上2种运行机制都是Node.js,故您需仔细阅读下面几点 - - - 如果使用方法一与方法二,需自行提供京东cookie填写到 [jdCookie.js](https://github.com/lxk0301/jd_scripts/blob/master/jdCookie.js) 里面 - - - - 获取京东cookie教程可参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md) + - 获取京东cookie教程可参考 [浏览器获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie2.md) - 京东APP扫码获取cookie(此种方式获取的cookie有效期为90天)(执行`node getJDCookie.js`即可) - - 方法三Docker安装Cookie请见各自的说明。 + - 方法二Docker安装Cookie请见各自的说明。 -### 方法四:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭) +### 方法三:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭) - - [京东cookie获取脚本 JD_extra_cookie.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/JD_extra_cookie.js) + - [京东cookie获取脚本 JD_extra_cookie.js](https://raw.githubusercontent.com/LXK9301/jd_scripts/master/JD_extra_cookie.js) ### 赞赏码(开发维护不易,请赏杯茶水费) -
+
### 特别感谢(排名不分先后): * [@NobyDa](https://github.com/NobyDa) diff --git a/Surge/lxk0301_Task.sgmodule.sgmodule b/Surge/lxk0301_Task.sgmodule.sgmodule index 758c38b8..f5c54e5a 100644 --- a/Surge/lxk0301_Task.sgmodule.sgmodule +++ b/Surge/lxk0301_Task.sgmodule.sgmodule @@ -1,75 +1,82 @@ -#!name=lxk0301 iOS Tasks Module +#!name=LXK9301 iOS Tasks Module #!desc=iOS Tasks 模块配置 -#!system=ios -# Task模块配置 By lxk0301 -# GitHub主页(https://github.com/lxk0301/jd_scripts) +# Task模块配置 By LXK9301 +# GitHub主页(https://github.com/LXK9301/jd_scripts) # TG讨论组 (https://t.me/JD_fruit_pet) # TG通知频道 (https://t.me/jdfruit) -# Surge的Task脚本模块地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule +# Surge的Task脚本模块地址: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule [Script] #东东农场 -cron "40 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,timeout=530, wake-system=1, tag=东东农场 +cron "40 8-18/5 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js,timeout=530, wake-system=1, tag=东东农场 #东东萌宠 -cron "20 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠 +cron "20 8-18/5 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠 #京东种豆得豆 -cron "50 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,timeout=630, wake-system=1, tag=京东种豆得豆 +cron "50 7-21/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js,timeout=630, wake-system=1, tag=京东种豆得豆 #宠汪汪 -cron "15 1,7,9,12,18,21 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js,timeout=330, wake-system=1, tag=宠汪汪 +cron "15 1,7,9,12,18,21 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js,timeout=330, wake-system=1, tag=宠汪汪 #宠汪汪喂食(仅喂食) -cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js,timeout=30, wake-system=1, tag=宠汪汪喂食 +cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js,timeout=30, wake-system=1, tag=宠汪汪喂食 #宠汪汪偷好友积分与狗粮 -cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js,timeout=1420, wake-system=1, tag=宠汪汪偷好友积分与狗粮 +cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js,timeout=1420, wake-system=1, tag=宠汪汪偷好友积分与狗粮 #宠汪汪积分兑换奖品 -cron "0 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js,timeout=130, wake-system=1, tag=宠汪汪积分兑换奖品 +cron "0 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js,timeout=130, wake-system=1, tag=宠汪汪积分兑换奖品 #京东天天加速 -cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js,timeout=130, wake-system=1, tag=京东天天加速 +cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js,timeout=130, wake-system=1, tag=京东天天加速 #京东摇钱树 -cron "15 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js,timeout=130, wake-system=1, tag=京东摇钱树 +cron "15 */5 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js,timeout=130, wake-system=1, tag=京东摇钱树 #摇京豆 -cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js, timeout=1150, wake-system=1, tag=摇京豆 +cron "5 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js, timeout=1150, wake-system=1, tag=摇京豆 #京小超 -cron "11 1-23/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,timeout=530, wake-system=1, tag=京小超 +cron "11 1-23/5 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js,timeout=530, wake-system=1, tag=京小超 京小超兑换奖品 -cron "0,30 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,timeout=130, wake-system=1, tag=京小超兑换奖品 +cron "0,30 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js,timeout=130, wake-system=1, tag=京小超兑换奖品 #取关京东店铺商品 -cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,timeout=250, wake-system=1, tag=取关京东店铺商品 +cron "55 23 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js,timeout=250, wake-system=1, tag=取关京东店铺商品 #进店领豆 -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js,timeout=130, wake-system=1, tag=进店领豆 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js,timeout=130, wake-system=1, tag=进店领豆 #宠汪汪邀请助力与赛跑助力 -cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, timeout=230, wake-system=1, tag=宠汪汪邀请助力与赛跑助力 +cron "15 10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, timeout=230, wake-system=1, tag=宠汪汪邀请助力与赛跑助力 #京东全民开红包 -cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, wake-system=1, tag=京东全民开红包 +cron "1 1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, wake-system=1, tag=京东全民开红包 #京豆变动通知 -cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, timeout=650, wake-system=1, tag=京豆变动通知 +cron "2 9 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js, timeout=650, wake-system=1, tag=京豆变动通知 #点点券 -cron "30 0,20 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, timeout=650, wake-system=1, tag=点点券 +cron "30 0,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js, timeout=650, wake-system=1, tag=点点券 #京喜工厂 -cron "24 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, timeout=650, wake-system=1, tag=京喜工厂 +cron "24 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js, timeout=650, wake-system=1, tag=京喜工厂 #东东工厂 -cron "40 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, timeout=650, wake-system=1, tag=东东工厂 +cron "40 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js, timeout=650, wake-system=1, tag=东东工厂 #东东小窝 -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, timeout=650, wake-system=1, tag=东东小窝 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, timeout=650, wake-system=1, tag=东东小窝 #十元街 -cron "40 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, timeout=650, wake-system=1, tag=十元街 +cron "40 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, timeout=650, wake-system=1, tag=十元街 #领京豆额外奖励 -cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励 +cron "30 10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励 #京东汽车 -cron "0 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车 +cron "0 10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车 #京东汽车积分兑换京豆 -cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, timeout=2750, wake-system=1, tag=京东汽车积分兑换京豆 +cron "0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, timeout=2750, wake-system=1, tag=京东汽车积分兑换京豆 #京东快递签到 -cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, timeout=750, wake-system=1, tag=京东快递签到 +cron "20 11 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, timeout=750, wake-system=1, tag=京东快递签到 #京东直播(活动结束时间未知) -cron "20 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, timeout=750, wake-system=1, tag=京东直播 +cron "20 12 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js, timeout=750, wake-system=1, tag=京东直播 #京东赚赚 -cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, timeout=750, wake-system=1, tag=京东赚赚 +cron "20 11 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js, timeout=750, wake-system=1, tag=京东赚赚 #注销京东店铺会员卡 -cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, timeout=750, wake-system=1, tag=注销京东店铺会员卡 +cron "20 12 * * 6" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js, timeout=750, wake-system=1, tag=注销京东店铺会员卡 #疯狂的joy日常任务 -cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务 +cron "30 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js, timeout=1750, wake-system=1, tag=疯狂的joy日常任务 #签到领现金 -签到领现金 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=2220,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js - +签到领现金 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=2220,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js +#京东家庭号 +京东家庭号 = type=cron,cronexp="1 * * * *",wake-system=1,timeout=2220,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js +#京东口袋书城 +口袋书店 = type=cron,cronexp="1 8,12,18 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js +#京喜签到 +京喜签到 = type=cron,cronexp="5 8 * * *",wake-system=1,timeout=1220,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js +#以为为短期活动 +#京东年货节 +京东年货节 = type=cron,cronexp="0 8 * * *",wake-system=1,timeout=2220,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js diff --git a/USER_AGENTS.js b/USER_AGENTS.js index 56152292..2752842b 100644 --- a/USER_AGENTS.js +++ b/USER_AGENTS.js @@ -51,7 +51,8 @@ const USER_AGENTS = [ "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.14 (KHTML, like Gecko) Chrome/24.0.1292.0 Safari/537.14", "JD4iPhone/167490 (iPhone; iOS 14.3; Scale/2.00)", "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0", - "jdapp;android;9.3.5;10;2346663656561603-4353564623932316;network/wifi;model/ONEPLUS A5010;addressid/138709979;aid/2dfceea045ed292a;oaid/;osVer/29;appBuild/86390;partner/jingdong;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36" + "jdapp;android;9.3.5;10;2346663656561603-4353564623932316;network/wifi;model/ONEPLUS A5010;addressid/138709979;aid/2dfceea045ed292a;oaid/;osVer/29;appBuild/86390;partner/jingdong;eufv/1;Mozilla/5.0 (Linux; Android 10; ONEPLUS A5010 Build/QKQ1.191014.012; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/77.0.3865.120 MQQBrowser/6.2 TBS/045230 Mobile Safari/537.36", + "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", ] /** * 生成随机数字 diff --git a/activity/jd_818.js b/activity/jd_818.js index 58929fa2..777b4072 100644 --- a/activity/jd_818.js +++ b/activity/jd_818.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-03 09:25:47 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-23 12:27:07 */ /* @@ -22,12 +22,12 @@ // quantumultx [task_local] #京东手机狂欢城 -1 0-18/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js, tag=京东手机狂欢城, enabled=true +1 0-18/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_818.js, tag=京东手机狂欢城, enabled=true // Loon [Script] -cron "1 0-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js,tag=京东手机狂欢城 +cron "1 0-18/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_818.js,tag=京东手机狂欢城 // Surge -京东手机狂欢城 = type=cron,cronexp=1 0-18/6 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js +京东手机狂欢城 = type=cron,cronexp=1 0-18/6 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_818.js */ const $ = new Env('京东手机狂欢城'); @@ -832,10 +832,10 @@ function getListRank() { }) }) } -function updateShareCodes(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json') { +function updateShareCodes(url = 'https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_shareCodes.json') { return new Promise(resolve => { - //https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json - //https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json + //https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_shareCodes.json + //https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_shareCodes.json $.get({url}, async (err, resp, data) => { try { if (err) { @@ -851,10 +851,10 @@ function updateShareCodes(url = 'https://raw.githubusercontent.com/lxk0301/updat }) }) } -function updateShareCodesCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_shareCodes.json') { +function updateShareCodesCDN(url = 'https://raw.fastgit.org/LXK9301/updateTeam/master/jd_shareCodes.json') { return new Promise(resolve => { - //https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_shareCodes.json - //https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_shareCodes.json + //https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_shareCodes.json + //https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_shareCodes.json $.get({url}, async (err, resp, data) => { try { if (err) { @@ -914,8 +914,8 @@ function TotalBean() { async function showMsg() { let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date(activeEndTime).getTime()) { - $.msg($.name, '活动已结束', `该活动累计获得京豆:${$.jbeanCount}个\niOS用户请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\n https://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `该活动累计获得京豆:${$.jbeanCount}个\niOS用户请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\ngithub action用户请删除.github/workflows/jd_818.yml文件\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\n https://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, `京东账号${$.index} ${$.nickName || $.UserName}`, `${$.jbeanCount ? `${$.integer ? `今日获得积分:${$.integer}个\n` : ''}${$.num ? `今日排名:${$.num}\n` : ''}今日参数人数:${$.lasNum}人\n累计获得京豆:${$.jbeanCount}个🐶\n` : ''}${$.jbeanCount ? `累计获得积分:${$.integralCount}个\n` : ''}${$.jbeanNum ? `${$.date}日奖品:${$.jbeanNum}\n` : ''}具体详情点击弹窗跳转后即可查看`, {"open-url": "https://rdcseason.m.jd.com/#/hame"}); } diff --git a/activity/jd_apple_live.js b/activity/jd_apple_live.js index a38a9470..681e5068 100644 --- a/activity/jd_apple_live.js +++ b/activity/jd_apple_live.js @@ -8,17 +8,17 @@ ============Quantumultx=============== [task_local] #苹果抽奖机 -10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js, tag=苹果抽奖机, enabled=true +10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_apple_live.js, tag=苹果抽奖机, enabled=true ================Loon============== [Script] -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js,tag=苹果抽奖机 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_apple_live.js,tag=苹果抽奖机 ===============Surge================= -苹果抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js +苹果抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_apple_live.js ============小火箭========= -苹果抽奖机 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_apple_live.js, cronexpr="10 0 * * *", timeout=200, enable=true +苹果抽奖机 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_apple_live.js, cronexpr="10 0 * * *", timeout=200, enable=true */ const $ = new Env('苹果抽奖机'); diff --git a/activity/jd_digital_floor.js b/activity/jd_digital_floor.js index 4a61b371..37db5343 100644 --- a/activity/jd_digital_floor.js +++ b/activity/jd_digital_floor.js @@ -4,23 +4,23 @@ 共计25京豆,一天运行一次即可 活动时间:2020-12-4 到 2020-12-11 活动入口:https://prodev.m.jd.com/mall/active/nKxVyPnuLwAsQSTfidZ9z4RKVZy/index.html#/ -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_digital_floor.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_digital_floor.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #数码加购京豆 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_digital_floor.js, tag=数码加购京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_digital_floor.js, tag=数码加购京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_digital_floor.js, tag=数码加购京豆 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_digital_floor.js, tag=数码加购京豆 ===============Surge================= -数码加购京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_digital_floor.js +数码加购京豆 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_digital_floor.js ============小火箭========= -数码加购京豆 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_digital_floor.js, cronexpr="10 7 * * *", timeout=200, enable=true +数码加购京豆 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_digital_floor.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('数码加购京豆'); diff --git a/activity/jd_ds.js b/activity/jd_ds.js index 0e153a57..2245c64e 100644 --- a/activity/jd_ds.js +++ b/activity/jd_ds.js @@ -1,5 +1,5 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-27 09:19:21 * @Last Modified by: shylocks https://github.com/shylocks * @Last Modified time: 2020-12-7 17:39:02 @@ -8,24 +8,24 @@ 京东代属脚本,类似十元街,⚠️⚠️⚠️⚠️限校园用户可使用,其他用户签到失败无京豆 一周签到下来可获得30京豆,一天任意时刻运行一次即可 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js 参考github@jidesheng6修改而来 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #京东代属 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ds.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js, tag=京东代属, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_ds.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js, tag=京东代属 ===============Surge================= -京东代属 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js +京东代属 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js ============小火箭========= -京东代属 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, cronexpr="10 7 * * *", timeout=200, enable=true +京东代属 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ds.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('京东代属'); @@ -91,8 +91,8 @@ function showMsg() { // $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { - $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); } diff --git a/activity/jd_health.js b/activity/jd_health.js index d4c66c11..827e941e 100644 --- a/activity/jd_health.js +++ b/activity/jd_health.js @@ -7,17 +7,17 @@ ============Quantumultx=============== [task_local] #健康抽奖机 -10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, tag=健康抽奖机, enabled=true +10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_health.js, tag=健康抽奖机, enabled=true ================Loon============== [Script] -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_health.js,tag=健康抽奖机 ===============Surge================= -健康抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js +健康抽奖机 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_health.js ============小火箭========= -健康抽奖机 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, cronexpr="10 0 * * *", timeout=200, enable=true +健康抽奖机 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_health.js, cronexpr="10 0 * * *", timeout=200, enable=true */ const $ = new Env('健康抽奖机'); diff --git a/activity/jd_jdh.js b/activity/jd_jdh.js index 5e840a8b..0d8c11ae 100644 --- a/activity/jd_jdh.js +++ b/activity/jd_jdh.js @@ -6,17 +6,17 @@ ============Quantumultx=============== [task_local] #京东健康 -10 8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png, enabled=true +10 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdh.js, tag=京东健康, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_jdh.png, enabled=true ================Loon============== [Script] -cron "10 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康 +cron "10 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdh.js,tag=京东健康 ===============Surge================= -京东健康 = type=cron,cronexp="10 8 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js +京东健康 = type=cron,cronexp="10 8 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdh.js ============小火箭========= -京东健康 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, cronexpr="10 8 * * *", timeout=200, enable=true +京东健康 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdh.js, cronexpr="10 8 * * *", timeout=200, enable=true */ const $ = new Env('京东健康'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/activity/jd_jxstory.js b/activity/jd_jxstory.js index 9f0333e1..bec14c83 100644 --- a/activity/jd_jxstory.js +++ b/activity/jd_jxstory.js @@ -9,17 +9,17 @@ ============Quantumultx=============== [task_local] #京喜故事 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxstory.js, tag=京喜故事, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxstory.js, tag=京喜故事, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxstory.js,tag=京喜故事 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxstory.js,tag=京喜故事 ===============Surge================= -京喜故事 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxstory.js +京喜故事 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxstory.js ============小火箭========= -京喜故事 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxstory.js, cronexpr="10 * * * *", timeout=200, enable=true +京喜故事 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxstory.js, cronexpr="10 * * * *", timeout=200, enable=true */ diff --git a/activity/jd_live_redrain.js b/activity/jd_live_redrain.js index 93fceeb4..18db6765 100644 --- a/activity/jd_live_redrain.js +++ b/activity/jd_live_redrain.js @@ -2,23 +2,23 @@ 直播红包雨 每天0,9,11,13,15,17,19,20,21,23可领,每日上限未知 活动时间:2020-12-14 到 2020-12-31 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #直播红包雨 -0 0,9,11,13,15,17,19,20,21,23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +0 0,9,11,13,15,17,19,20,21,23 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "0 0,9,11,13,15,17,19,20,21,23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨 +cron "0 0,9,11,13,15,17,19,20,21,23 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨 ===============Surge================= -直播红包雨 = type=cron,cronexp="0 0,9,11,13,15,17,19,20,21,23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js +直播红包雨 = type=cron,cronexp="0 0,9,11,13,15,17,19,20,21,23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js ============小火箭========= -直播红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, cronexpr="0 0,9,11,13,15,17,19,20,21,23 * * *", timeout=200, enable=true +直播红包雨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain.js, cronexpr="0 0,9,11,13,15,17,19,20,21,23 * * *", timeout=200, enable=true */ const $ = new Env('直播红包雨'); let ids = { diff --git a/activity/jd_live_redrain2.js b/activity/jd_live_redrain2.js index 1de27bf3..2985bc6f 100644 --- a/activity/jd_live_redrain2.js +++ b/activity/jd_live_redrain2.js @@ -2,23 +2,23 @@ 超级直播间红包雨 每天20-23半点可领,每日上限未知 活动时间:活动时间未知 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain2.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain2.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #超级直播间红包雨 -30 20-23/1 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain2.js, tag=超级直播间红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +30 20-23/1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain2.js, tag=超级直播间红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "30 20-23/1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain2.js, tag=超级直播间红包雨 +cron "30 20-23/1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain2.js, tag=超级直播间红包雨 ===============Surge================= -超级直播间红包雨 = type=cron,cronexp="30 20-23/1 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain2.js +超级直播间红包雨 = type=cron,cronexp="30 20-23/1 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain2.js ============小火箭========= -超级直播间红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain2.js, cronexpr="30 20-23/1 * * *", timeout=200, enable=true +超级直播间红包雨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live_redrain2.js, cronexpr="30 20-23/1 * * *", timeout=200, enable=true */ const $ = new Env('超级直播间红包雨'); diff --git a/activity/jd_mohe.js b/activity/jd_mohe.js index 224b08cf..8ad49d43 100644 --- a/activity/jd_mohe.js +++ b/activity/jd_mohe.js @@ -8,12 +8,12 @@ // quantumultx [task_local] #热8超级盲盒 -1 0,1-23/3 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_mohe.js, tag=热8超级盲盒, enabled=true +1 0,1-23/3 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_mohe.js, tag=热8超级盲盒, enabled=true // Loon [Script] -cron "1 0,1-23/3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_mohe.js,tag=热8超级盲盒 +cron "1 0,1-23/3 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_mohe.js,tag=热8超级盲盒 // Surge -热8超级盲盒 = type=cron,cronexp=1 0,1-23/3 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_mohe.js +热8超级盲盒 = type=cron,cronexp=1 0,1-23/3 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_mohe.js */ const $ = new Env('热8超级盲盒'); //Node.js用户请在jdCookie.js处填写京东ck; @@ -40,7 +40,7 @@ let shareId = ''; await taskList(); await getAward();//抽奖 if ($.time('yyyy-MM-dd') === '2020-08-19') { - $.msg($.name, '活动已结束', `请禁用或删除脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts\n`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); + $.msg($.name, '活动已结束', `请禁用或删除脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/LXK9301/jd_scripts\n`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); } else { $.msg($.name, '', `【京东账号一】${UserName}\n任务已做完.\n 抽奖详情查看 https://blindbox.jd.com\n`, {"open-url": "https://blindbox.jd.com"}); } diff --git a/activity/jd_ms_redrain.js b/activity/jd_ms_redrain.js index d2e27c61..0fd8dbcb 100644 --- a/activity/jd_ms_redrain.js +++ b/activity/jd_ms_redrain.js @@ -2,23 +2,23 @@ 秒杀红包雨,可以获取3次,一天运行一次即可 活动时间:2020-12-1 到 2020-12-31 活动入口:首页👉秒杀👉往下拉(手指向上滑动)👉可以看到狂撒2亿京东 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #秒杀红包雨 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨 ===============Surge================= -秒杀红包雨 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js +秒杀红包雨 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js ============小火箭========= -秒杀红包雨 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, cronexpr="10 7 * * *", timeout=200, enable=true +秒杀红包雨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_ms_redrain.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('秒杀红包雨'); @@ -86,8 +86,8 @@ function showMsg() { return new Promise(async resolve => { let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { - $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); } diff --git a/activity/jd_pubg.js b/activity/jd_pubg.js index f10a9cdd..8523722e 100644 --- a/activity/jd_pubg.js +++ b/activity/jd_pubg.js @@ -8,17 +8,17 @@ PUBG ,运行时间会比较久,Surge请加大timeout时间 ============Quantumultx=============== [task_local] #PUBG -10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pubg.js, tag=PUBG, enabled=true +10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pubg.js, tag=PUBG, enabled=true ================Loon============== [Script] -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pubg.js,tag=PUBG +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pubg.js,tag=PUBG ===============Surge================= -PUBG = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pubg.js +PUBG = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pubg.js ============小火箭========= -PUBG = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pubg.js, cronexpr="10 0 * * *", timeout=200, enable=true +PUBG = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pubg.js, cronexpr="10 0 * * *", timeout=200, enable=true */ const $ = new Env('PUBG'); !function(n) { diff --git a/activity/jd_split.js b/activity/jd_split.js index fa112ee6..9537b0a1 100644 --- a/activity/jd_split.js +++ b/activity/jd_split.js @@ -8,17 +8,17 @@ ============Quantumultx=============== [task_local] #金榜年终奖 -10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_split.js, tag=年终奖, enabled=true +10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_split.js, tag=年终奖, enabled=true ================Loon============== [Script] -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_split.js,tag=年终奖 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_split.js,tag=年终奖 ===============Surge================= -金榜年终奖 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_split.js +金榜年终奖 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_split.js ============小火箭========= -金榜年终奖 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_split.js, cronexpr="10 0 * * *", timeout=200, enable=true +金榜年终奖 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_split.js, cronexpr="10 0 * * *", timeout=200, enable=true */ const $ = new Env('金榜年终奖'); diff --git a/activity/jd_watch.js b/activity/jd_watch.js index 018bd047..3f314cd0 100644 --- a/activity/jd_watch.js +++ b/activity/jd_watch.js @@ -11,17 +11,17 @@ ============Quantumultx=============== [task_local] #京东看一看 -10 9 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看, enabled=true +10 9 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_watch.js, tag=京东看一看, enabled=true ================Loon============== [Script] -cron "10 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js,tag=京东看一看 +cron "10 9 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_watch.js,tag=京东看一看 ===============Surge================= -京东看一看 = type=cron,cronexp="10 9 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js +京东看一看 = type=cron,cronexp="10 9 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_watch.js ============小火箭========= -京东看一看 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, cronexpr="10 9 * * *", timeout=900, enable=true +京东看一看 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_watch.js, cronexpr="10 9 * * *", timeout=900, enable=true */ const $ = new Env('京东看一看'); let acceptBody = [ @@ -225,8 +225,8 @@ function showMsg() { // $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { - $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, '', `京东账号${$.index} ${$.nickName}\n${message}`); } diff --git a/activity/jd_xtg.js b/activity/jd_xtg.js index 2b0a897f..fb3478cd 100644 --- a/activity/jd_xtg.js +++ b/activity/jd_xtg.js @@ -1,11 +1,11 @@ /* - * @Author: lxk0301 + * @Author: LXK9301 * @Date: 2020-10-21 17:04:04 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-05 00:35:04 */ /** - 星推官脚本 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js + 星推官脚本 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_xtg.js 星推官活动地址:https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html 活动时间:2020年10月21日 00:00:00-2020年11月11日 23:59:59 京豆先到先得!!!!!!!!!!! @@ -17,12 +17,12 @@ // quantumultx [task_local] #京东星推官 - 2 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js, tag=京东星推官, enabled=true + 2 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_xtg.js, tag=京东星推官, enabled=true // Loon [Script] - cron "2 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js,tag=京东星推官 + cron "2 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_xtg.js,tag=京东星推官 // Surge - 京东星推官 = type=cron,cronexp=2 0 * * *,wake-system=1,timeout=320,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js + 京东星推官 = type=cron,cronexp=2 0 * * *,wake-system=1,timeout=320,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_xtg.js */ const $ = new Env('京东星推官'); const activeEndTime = '2020/11/11 23:59:59+08:00';//活动结束时间 @@ -153,8 +153,8 @@ async function showMsg() { console.log(`活动活动京豆数量:${$.jdNum - $.beanCount}`); let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date(activeEndTime).getTime()) { - $.msg($.name, '活动已结束', `请删除或禁用此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `请删除或禁用此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `请删除此脚本\n如果帮助到您可以点下🌟STAR鼓励我一下,谢谢\n咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, `账号${$.index} ${$.nickName || $.UserName}`, `做任务之前京豆总计:${$.beanCount}\n做完任务后京豆总计:${$.jdNum}\n${($.jdNum - $.beanCount) > 0 ? `获得京豆:${$.jdNum - $.beanCount}京豆 🐶(仅供参考)\n` : ''}京豆先到先得\n活动地址点击弹窗跳转后即可查看\n注:如未获得京豆就是已被分完`, {"open-url": "https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html"}) if ($.isNode()) await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}`, `账号${$.index} ${$.nickName || $.UserName}\n做任务之前京豆总计:${$.beanCount}\n做完任务后京豆总计:${$.jdNum}\n${($.jdNum - $.beanCount) > 0 ? `获得京豆:${$.jdNum - $.beanCount}京豆 🐶(仅供参考)\n` : ''}京豆先到先得\n注:如未获得京豆就是已被分完\n活动结束时间:2020年11月12日 23:59:59\n活动地址:https://prodev.m.jd.com/mall/active/3gSzKSnvrrhYushciUpzHcDnkYE3/index.html`) diff --git a/activity/jr_sign.js b/activity/jr_sign.js index 18917e8e..34506658 100644 --- a/activity/jr_sign.js +++ b/activity/jr_sign.js @@ -1,23 +1,23 @@ /* 金融打卡领年终奖 活动时间:2020-12-8 到 2020-12-31 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #金融打卡领年终奖 -10 6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +10 6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "10 6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖 +cron "10 6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖 ===============Surge================= -金融打卡领年终奖 = type=cron,cronexp="10 6 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js +金融打卡领年终奖 = type=cron,cronexp="10 6 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js ============小火箭========= -金融打卡领年终奖 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, cronexpr="10 6 * * *", timeout=200, enable=true +金融打卡领年终奖 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jr_sign.js, cronexpr="10 6 * * *", timeout=200, enable=true */ const $ = new Env('金融打卡领年终奖'); @@ -81,8 +81,8 @@ function showMsg() { return new Promise(async resolve => { let nowTime = new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000; if (nowTime > new Date('2020/12/31 23:59:59+08:00').getTime()) { - $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/lxk0301/jd_scripts`, {"open-url": "https://github.com/lxk0301/jd_scripts"}); - if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/lxk0301/jd_scripts`) + $.msg($.name, '活动已结束', `咱江湖再见\nhttps://github.com/LXK9301/jd_scripts`, {"open-url": "https://github.com/LXK9301/jd_scripts"}); + if ($.isNode()) await notify.sendNotify($.name + '活动已结束', `咱江湖再见\n https://github.com/LXK9301/jd_scripts`) } else { $.msg($.name, '', `【京东账号${$.index}】${$.nickName}\n${message}`); } diff --git a/backUp/iCloud.md b/backUp/iCloud.md index d17725e1..a2450aa0 100644 --- a/backUp/iCloud.md +++ b/backUp/iCloud.md @@ -76,7 +76,7 @@ exports.main_handler = async (event, context, callback) => { **注意:**
Ⅰ方案一与方案二不能混合到同一个index.js文件中使用,同一个仓库下,二者只能选择其一。
-Ⅱ感谢[issues#115](https://github.com/lxk0301/jd_scripts/issues/115)中的解决方案,目前云函数连续测试已经可以规避热启动问题了。
+Ⅱ感谢[issues#115](https://github.com/LXK9301/jd_scripts/issues/115)中的解决方案,目前云函数连续测试已经可以规避热启动问题了。
Ⅲ在确保完全按照本教程设置的情况下测试云函数运行情况,对于部分人运行日志中出现某些脚本运行失败其他正常,并且错误提示带有strict字样的,请自行删除index.js中的```'use strict';```,再做测试
**增加cookie** diff --git a/backUp/jd_Goods.js b/backUp/jd_Goods.js index 9c6e2baa..5c33eaf9 100644 --- a/backUp/jd_Goods.js +++ b/backUp/jd_Goods.js @@ -1,5 +1,5 @@ // 半自动提醒心愿单50京豆。 -// 15 */4 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/jd_Goods.js +// 15 */4 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/jd_Goods.js const $ = new Env('心愿单50京豆'); diff --git a/backUp/jd_fruit_double.js b/backUp/jd_fruit_double.js index 406425a4..de3ff380 100644 --- a/backUp/jd_fruit_double.js +++ b/backUp/jd_fruit_double.js @@ -5,12 +5,12 @@ jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d978574 // quantumultx [task_local] #jd免费水果 -5 6-18/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/znz1992/Gallery/master/jdsg.png, enabled=true +5 6-18/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/znz1992/Gallery/master/jdsg.png, enabled=true // Loon [Script] -cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,tag=东东农场 +cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js,tag=东东农场 // Surge -// 宠汪汪偷好友积分与狗粮 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js +// 宠汪汪偷好友积分与狗粮 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js 互助码shareCode请先手动运行脚本查看打印可看到 一天只能帮助4个人。多出的助力码无效 注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save diff --git a/backUp/jd_joy2.js b/backUp/jd_joy2.js index d368268c..cca550f5 100644 --- a/backUp/jd_joy2.js +++ b/backUp/jd_joy2.js @@ -9,10 +9,10 @@ Combine from Zero-S1/JD_tools(https://github.com/Zero-S1/JD_tools) // quantumultx // [task_local] // #京东宠汪汪 -// 15 1,2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js, tag=京东宠汪汪, img-url=https://raw.githubusercontent.com/znz1992/Gallery/master/jdww.png, enabled=true +// 15 1,2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js, tag=京东宠汪汪, img-url=https://raw.githubusercontent.com/znz1992/Gallery/master/jdww.png, enabled=true // Loon // [Script] -// cron "15 1,2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js,tag=京东宠汪汪 +// cron "15 1,2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js,tag=京东宠汪汪 const name = '京东宠汪汪'; const $ = new Env(name); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/backUp/jd_pet_double.js b/backUp/jd_pet_double.js index 84c25bb5..4cd1dcca 100644 --- a/backUp/jd_pet_double.js +++ b/backUp/jd_pet_double.js @@ -86,8 +86,8 @@ function* entrance() { } } for (let item of taskInfoKey) { - console.log(`新任务 【${taskInfo[item].title}】 功能未开发,请反馈给脚本维护者@lxk0301\n`); - $.msg($.name, subTitle, `新的任务 【${taskInfo[item].title}】 功能未开发,请反馈给脚本维护者@lxk0301\n`, {"open-url": "https://t.me/JD_fruit_pet"}) + console.log(`新任务 【${taskInfo[item].title}】 功能未开发,请反馈给脚本维护者@LXK9301\n`); + $.msg($.name, subTitle, `新的任务 【${taskInfo[item].title}】 功能未开发,请反馈给脚本维护者@LXK9301\n`, {"open-url": "https://t.me/JD_fruit_pet"}) } yield feedPetsAgain();//所有任务做完后,检测剩余狗粮是否大于110g,大于就继续投食 yield energyCollect(); diff --git a/backUp/jd_plantBean_double.js b/backUp/jd_plantBean_double.js index 686d410d..d5d24cdf 100644 --- a/backUp/jd_plantBean_double.js +++ b/backUp/jd_plantBean_double.js @@ -7,12 +7,12 @@ 互助码shareCode请先手动运行脚本查看打印可看到 // quantumultx [task_local] -1 7-21/2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true +1 7-21/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true // Loon [Script] -cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 +cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 // Surge -// 京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js +// 京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js 一天只能帮助3个人。多出的助力码无效 注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save */ diff --git a/backUp/mySelf.boxjs.json b/backUp/mySelf.boxjs.json index 15e015a4..66b8d71a 100644 --- a/backUp/mySelf.boxjs.json +++ b/backUp/mySelf.boxjs.json @@ -1,9 +1,9 @@ { - "id": "lxk0301.app.sub2", + "id": "LXK9301.app.sub2", "name": "自用", - "author": "@lxk0301", + "author": "@LXK9301", "icon": "https://avatars0.githubusercontent.com/u/21308593?s=52&v=4", - "repo": "https://github.com/lxk0301/jd_scripts/", + "repo": "https://github.com/LXK9301/jd_scripts/", "apps": [ { "id": "QQ_READ", diff --git a/backUp/qqread.js b/backUp/qqread.js index abb07afa..f9673021 100644 --- a/backUp/qqread.js +++ b/backUp/qqread.js @@ -1,10 +1,10 @@ /* ****************************************************************************** - 改用,nodejs云端专用。可N个账号。by;lxk0301 + 改用,nodejs云端专用。可N个账号。by;LXK9301 一个账号需三个环境变量/secret 分别为 QQ_READ_HEADER_VAL QQ_READ_TIME_URL_VAL QQ_READ_TIME_HEADER_VAL 多个账号 对应三个环境变量/secret 使用@符号或者换行隔开 - iOS可使用BoxJs可使用此订阅修改复制所需的环境变量 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/mySelf.boxjs.json + iOS可使用BoxJs可使用此订阅修改复制所需的环境变量 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/mySelf.boxjs.json 环境变量与BoxJs里面对应关系 QQ_READ_HEADER_VAL ------》 qqreadbodyVal QQ_READ_TIME_URL_VAL ------》 qqreadtimeurl @@ -19,19 +19,19 @@ ziye hostname=mqqapi.reader.qq.com ############## 圈x #企鹅读书获取更新body -https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track url script-request-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js +https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track url script-request-body https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js #企鹅读书获取时长cookie -https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid? url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js +https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid? url script-request-header https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js ############## loon #企鹅读书获取更新body -http-request https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js,requires-body=true, tag=企鹅读书获取更新body +http-request https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js,requires-body=true, tag=企鹅读书获取更新body #企鹅读书获取时长cookie -http-request https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid? script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js, requires-header=true, tag=企鹅读书获取时长cookie +http-request https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid? script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js, requires-header=true, tag=企鹅读书获取时长cookie ############## surge #企鹅读书获取更新body -企鹅读书获取更新body = type=http-request,pattern=https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js, script-update-interval=0 +企鹅读书获取更新body = type=http-request,pattern=https:\/\/mqqapi\.reader\.qq\.com\/log\/v4\/mqq\/track,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js, script-update-interval=0 #企鹅读书获取时长cookie -企鹅读书获取时长cookie = type=http-request,pattern=https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid?,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/qqread.js +企鹅读书获取时长cookie = type=http-request,pattern=https:\/\/mqqapi\.reader\.qq\.com\/mqq\/addReadTimeWithBid?,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/qqread.js diff --git a/backUp/qqreadOpenBox.js b/backUp/qqreadOpenBox.js index 5182b6e5..4b87601f 100644 --- a/backUp/qqreadOpenBox.js +++ b/backUp/qqreadOpenBox.js @@ -1,5 +1,5 @@ /* -lxk0301修改自用,单独开宝箱 +LXK9301修改自用,单独开宝箱 ****************************************************************************** 本人github地址 https://github.com/ziye12/JavaScript 转载请备注个名字,谢谢 diff --git a/backUp/tencentscf.md b/backUp/tencentscf.md index 30c04ca2..20701a5c 100644 --- a/backUp/tencentscf.md +++ b/backUp/tencentscf.md @@ -42,7 +42,7 @@ let CookieJDs = [ ] ``` -> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md) +> 注:获取京东 cookie 教程参考 [浏览器获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie2.md) ## 4. 部署到云函数 diff --git a/backUp/webhook.js b/backUp/webhook.js index 18e12294..de3398ab 100644 --- a/backUp/webhook.js +++ b/backUp/webhook.js @@ -1,14 +1,14 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-10-24 18:53:29 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-05 18:54:13 */ const $ = new Env('Webhook触发Action'); let ACTIONS_TRIGGER_TOKEN = '';//Personal access tokens,申请教程:https://www.jianshu.com/p/bb82b3ad1d11 记得勾选repo权限就行 let TRIGGER_KEYWORDS = '';//.github/workflows/路径里面yml文件里面repository_dispatch项目的types值,例如jd_fruit.yml里面的值为fruit -let githubUser = '';//github用户名,例:lxk0301 +let githubUser = '';//github用户名,例:LXK9301 let repo = '';//需要触发的 Github Action 所在的仓库名称 例:scripts !(async () => { diff --git a/backUp/xmSports.js b/backUp/xmSports.js index 9bb8b1c0..e8300097 100644 --- a/backUp/xmSports.js +++ b/backUp/xmSports.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-01 13:43:28 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-03 13:43:28 */ /* @@ -14,19 +14,19 @@ APP Store下载小米运动APP hostname = account.huami.com Surge [Script] -小米运动 = type=cron,cronexp="15 17 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js -小米运动获取Token = type=http-response,pattern=^https:\/\/account\.huami\.com\/v2\/client\/login, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js +小米运动 = type=cron,cronexp="15 17 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js +小米运动获取Token = type=http-response,pattern=^https:\/\/account\.huami\.com\/v2\/client\/login, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js 圈X [task_local] # 小米运动 -15 17 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png, enabled=true +15 17 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, tag=小米运动, img-url=https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png, enabled=true [rewrite_local] # 小米运动获取Token -^https:\/\/account\.huami\.com\/v2\/client\/login url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js +^https:\/\/account\.huami\.com\/v2\/client\/login url script-response-body https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js Loon [Script] -cron "15 17 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动 -http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token +cron "15 17 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, tag=小米运动 +http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token */ const $ = new Env('小米运动'); diff --git a/backUp/xmly_speed_ccokie.js b/backUp/xmly_speed_ccokie.js index 3a707bfb..29d67997 100644 --- a/backUp/xmly_speed_ccokie.js +++ b/backUp/xmly_speed_ccokie.js @@ -5,14 +5,14 @@ [MITM] hostname = m.ximalaya.com Surge - 喜马拉雅极速版Cookie = type=http-request,pattern=https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmly_speed_ccokie.js + 喜马拉雅极速版Cookie = type=http-request,pattern=https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmly_speed_ccokie.js Loon: - http-request https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmly_speed_ccokie.js + http-request https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmly_speed_ccokie.js , requires-body=true, timeout=10, tag=喜马拉雅极速版Cookie QX: [rewrite_local] # 喜马拉雅极速版Cookie - https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmly_speed_ccokie.js + https:\/\/m\.ximalaya\.com\/speed\/task-center\/account\/coin url script-request-header https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmly_speed_ccokie.js */ const $ = new Env('喜马拉雅极速版获取cookie') diff --git a/docker/Dockerfile b/docker/Dockerfile index c529af5b..5933d40f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,32 +1,28 @@ FROM alpine -LABEL AUTHOR="Akira " \ - VERSION=0.1.2 \ - UPDATE_CONTENT="更新内容较多,重新阅读仓库[Readme](https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" +LABEL AUTHOR="none" \ + VERSION=0.1.3 + +ENV DEFAULT_LIST_FILE=crontab_list.sh \ + CUSTOM_LIST_MERGE_TYPE=append \ + REPO_URL=https://gitee.com/lxk0301/jd_scripts.git RUN set -ex \ && apk update && apk upgrade\ - && apk add --no-cache tzdata moreutils git nodejs npm curl jq\ + && apk add --no-cache tzdata git nodejs moreutils npm curl jq \ && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone -RUN git clone https://github.com/lxk0301/jd_scripts /scripts \ +RUN git clone ${REPO_URL} /scripts \ && cd /scripts \ && git checkout master \ && mkdir logs \ - && npm install \ - && cd /tmp \ - && npm install request + && npm install -ENV BUILD_VERSION=0.1.2 \ - DEFAULT_LIST_FILE=crontab_list.sh \ - CUSTOM_LIST_MERGE_TYPE=append - -# github action 构建 -COPY ./docker/docker_entrypoint.sh /usr/local/bin -# 本地构建 -# COPY ./docker_entrypoint.sh /usr/local/bin -RUN chmod +x /usr/local/bin/docker_entrypoint.sh +RUN cp /scripts/docker/docker_entrypoint.sh /usr/local/bin \ + && chmod +x /usr/local/bin/docker_entrypoint.sh WORKDIR /scripts ENTRYPOINT ["docker_entrypoint.sh"] + +CMD [ "crond" ] diff --git a/docker/Readme.md b/docker/Readme.md index 922a84a7..f46bccfc 100644 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -61,7 +61,7 @@ jd_scripts - - [使用群晖默认配置用这个](./example/jd_scripts.syno.json) - - [使用群晖自定义任务追加到默认任务之后用这个](./example/jd_scripts.custom-append.syno.json) - - [使用群晖自定义任务覆盖默认任务用这个](./example/jd_scripts.custom-overwrite.syno.json) -- `jd_scripts/docker-compose.yml`里面的环境变量(`environment:`)配置[参考这里](https://github.com/lxk0301/jd_scripts/blob/master/githubAction.md#%E4%B8%8B%E6%96%B9%E6%8F%90%E4%BE%9B%E4%BD%BF%E7%94%A8%E5%88%B0%E7%9A%84-secrets%E5%85%A8%E9%9B%86%E5%90%88) +- `jd_scripts/docker-compose.yml`里面的环境变量(`environment:`)配置[参考这里](https://github.com/LXK9301/jd_scripts/blob/master/githubAction.md#%E4%B8%8B%E6%96%B9%E6%8F%90%E4%BE%9B%E4%BD%BF%E7%94%A8%E5%88%B0%E7%9A%84-secrets%E5%85%A8%E9%9B%86%E5%90%88) - `jd_scripts/my_crontab_list.sh` 参考内容如下,自己根据需要调整增加删除,不熟悉用户推荐使用默认配置: diff --git a/docker/crontab_list.sh b/docker/crontab_list.sh index 611d2bae..3db5ede5 100644 --- a/docker/crontab_list.sh +++ b/docker/crontab_list.sh @@ -1,5 +1,5 @@ #必须要的默认定时任务请勿删除 -52 */1 * * * sh /scripts/docker/default_task.sh >> /scripts/logs/default_task.log 2>&1 +52 */1 * * * docker_entrypoint.sh >> /scripts/logs/default_task.log 2>&1 # 每3天的23:50分清理一次日志 50 23 */3 * * rm -rf /scripts/logs/*.log diff --git a/docker/default_task.sh b/docker/default_task.sh index f86d9a09..8ccd94b3 100644 --- a/docker/default_task.sh +++ b/docker/default_task.sh @@ -1,122 +1,62 @@ #!/bin/sh set -e -echo "定时任务更新代码,git 拉取最新代码,并安装更新依赖..." -git -C /scripts pull -npm install --prefix /scripts - -######################################获取docker构建文件里面的自定义信息方法-start##################################################### -function getDockerImageLabel() { - repo=akyakya/jd_scripts - imageTag=latest - token=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" | jq -r '.token') - digest=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/${repo}/manifests/${imageTag}" | jq .config.digest -r) - labels=$(curl -s -L -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/${repo}/blobs/$digest" | jq .config.Labels) - echo $labels -} -######################################获取docker构建文件里面的自定义信息方法-end##################################################### - -######################################对比版本版本号大小方法-start################################################################### -function version_gt() { - test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -} -######################################对比版本版本号大小方法-end################################################################### - -#######################################通知用户更新镜像-start##################################################################### -echo "检查docker镜像更新更新..." -if type jq >/dev/null 2>&1; then - echo "获取dockerhub仓库镜像labels信息..." - labels=$(getDockerImageLabel) - export NOTIFY_CONTENT=$(echo $labels | jq -r .UPDATE_CONTENT) - version=$(echo $labels | jq -r .VERSION) -else - # 第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知 - echo "当前容版版本过旧,发送镜像更新通知" - export NOTIFY_CONTENT="更新内容较多,重新阅读仓库Readme(https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" - cd /scripts/docker - node notify_docker_user.js +echo "定义定时任务合并处理用到的文件路径..." +defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" +echo "默认文件定时任务文件路径为 ${defaultListFile}" +if [ $CUSTOM_LIST_FILE ]; then + customListFile="/scripts/docker/$CUSTOM_LIST_FILE" + echo "自定义定时任务文件路径为 ${customListFile}" fi - -#通知通知用户更新镜像 -if [ ! $BUILD_VERSION ]; then - if [ $version ]; then - echo "当前容器版本为空,dockerhub仓库版本为$version,发送通知" - cd /scripts/docker - node notify_docker_user.js - fi -else - if version_gt $version $BUILD_VERSION; then - echo "当前容器版本为$BUILD_VERSION,dockerhub仓库版本为$version,发送通知" - cd /scripts/docker - node notify_docker_user.js - fi -fi -#######################################通知用户更新镜像-end##################################################################### - -##兼容旧镜像的环境变量 -if [ !$DEFAULT_LIST_FILE ]; then - defaultListFile="/scripts/docker/crontab_list.sh" -else - defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" -fi - -customListFile="/scripts/docker/$CUSTOM_LIST_FILE" mergedListFile="/scripts/docker/merged_list_file.sh" +echo "合并后定时任务文件路径为 ${mergedListFile}" -if type ts >/dev/null 2>&1; then - echo '系统已安装moreutils工具包,默认定时任务增加|ts 输出' - ##复制一个新文件来追加|ts,防止git pull的时候冲突 - cp $defaultListFile /scripts/docker/default_list.sh - defaultListFile="/scripts/docker/default_list.sh" +echo "第3步将默认定时任务列表添加到并后定时任务文件..." +cat $defaultListFile >$mergedListFile - sed -i 's/>>/|ts >>/g' $defaultListFile -fi - -echo "定时任务合并加载最新定时任务列表..." -#判断 自定义文件是否存在 是否存在 +echo "第2步判断是否存在自定义任务任务列表并追加..." if [ $CUSTOM_LIST_FILE ]; then echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." if [ -f "$customListFile" ]; then if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" - cat $defaultListFile >$mergedListFile echo -e "" >>$mergedListFile cat $customListFile >>$mergedListFile elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then - cat $customListFile >$mergedListFile - echo "$CUSTOM_LIST_FILE but file ..." echo "配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." - touch "$customListFile" + cat $customListFile >$mergedListFile else echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." - cat $defaultListFile >$mergedListFile fi else echo "配置的自定义任务文件:$CUSTOM_LIST_FILE未找到,使用默认配置$DEFAULT_LIST_FILE..." - cat $defaultListFile >$mergedListFile fi else - echo "当前使用的为默认定时任务文件 $DEFAULT_LIST_FILE ..." - cat $defaultListFile >$mergedListFile + echo "当前只使用了默认定时任务文件 $DEFAULT_LIST_FILE ..." fi -# 判断最后要加载的定时任务是否包含默认定时任务,不包含的话就加进去 +echo "第3步判断是否配置了默认脚本更新任务..." if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then echo "合并后的定时任务文件,未包含必须的默认定时任务,增加默认定时任务..." echo -e >>$mergedListFile - echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile + echo "52 */1 * * * docker_entrypoint.sh >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile +else + sed -i "/default_task.sh/d" $mergedListFile + echo "#脚本追加默认定时任务" >>$mergedListFile + echo "52 */1 * * * docker_entrypoint.sh >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile fi +echo "第5步判断是否配置了随即延迟参数..." if [ $RANDOM_DELAY_MAX ]; then if [ $RANDOM_DELAY_MAX -ge 1 ]; then - echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... " + echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中..." sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\|jd_car_exchange.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile fi else - echo "未配置随即延迟对应的环境变量,故不设置延迟任务" + echo "未配置随即延迟对应的环境变量,故不设置延迟任务..." fi -##增加自定义shell脚本 +echo "第6步判断是否配置自定义shell执行脚本..." if [ 0"$CUSTOM_SHELL_FILE" = "0" ]; then echo "未配置自定shell脚本文件,跳过执行。" else @@ -124,6 +64,7 @@ else echo "自定义shell脚本为远程脚本,开始下在自定义远程脚本。" wget -O /scripts/docker/shell_script_mod.sh $CUSTOM_SHELL_FILE echo "下载完成,开始执行..." + echo "#远程自定义shell脚本追加定时任务" >>$mergedListFile sh -x /scripts/docker/shell_script_mod.sh echo "自定义远程shell脚本下载并执行结束。" else @@ -131,13 +72,21 @@ else echo "自定义shell脚本为docker挂载脚本文件,但是指定挂载文件不存在,跳过执行。" else echo "docker挂载的自定shell脚本,开始执行..." + echo "#docker挂载自定义shell脚本追加定时任务" >>$mergedListFile sh -x $CUSTOM_SHELL_FILE echo "docker挂载的自定shell脚本,执行结束。" fi fi fi -echo "加载最新的定时任务文件..." +echo "第7步增加 |ts 任务日志输出时间戳..." +sed -i "/\( ts\| |ts\|| ts\)/!s/>>/\|ts >>/g" $mergedListFile + +echo "第8步执行proc_file.sh脚本任务..." +sh -x /scripts/docker/proc_file.sh + +echo "第9步加载最新的定时任务文件..." crontab $mergedListFile -sh -x /scripts/docker/proc_file.sh +echo "第10步将仓库的docker_entrypoint.sh脚本更新至系统/usr/local/bin/docker_entrypoint.sh内..." +cat /scripts/docker/docker_entrypoint.sh >/usr/local/bin/docker_entrypoint.sh diff --git a/docker/docker_entrypoint.sh b/docker/docker_entrypoint.sh index 8b89c448..6fc71550 100644 --- a/docker/docker_entrypoint.sh +++ b/docker/docker_entrypoint.sh @@ -1,142 +1,28 @@ #!/bin/sh set -e -export LANG="zh_CN.UTF-8" - +#获取配置的自定义参数 if [ $1 ]; then - echo "Currently does not support specifying startup parameters" - echo "Please delete the last command attached to $(docker run) or the configured $(command:) parameter in $(docker-compose.yml)" - echo "暂时不支持指定启动参数,请删除 docker run时最后附带的命令 或者 docker-compose.yml中的配置的command:指令 " + run_cmd=$1 fi -echo "##############################################################################" -echo "Container start , Pull the latest code..." -echo "容器启动,git 拉取最新代码..." +echo "设定远程仓库地址..." +cd /scripts +git remote set-url origin $REPO_URL +git reset --hard +echo "git pull拉取最新代码..." git -C /scripts pull +echo "npm install 安装最新依赖" npm install --prefix /scripts -echo "##############################################################################" -######################################获取docker构建文件里面的自定义信息方法-start##################################################### -function getDockerImageLabel() { - repo=akyakya/jd_scripts - imageTag=latest - token=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" | jq -r '.token') - digest=$(curl -s -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/${repo}/manifests/${imageTag}" | jq .config.digest -r) - labels=$(curl -s -L -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -H "Authorization: Bearer $token" "https://registry-1.docker.io/v2/${repo}/blobs/$digest" | jq .config.Labels) - echo $labels -} -######################################获取docker构建文件里面的自定义信息方法-end##################################################### +echo "------------------------------------------------执行定时任务任务shell脚本------------------------------------------------" +sh -x /scripts/docker/default_task.sh +echo "--------------------------------------------------默认定时任务执行完成---------------------------------------------------" -######################################对比版本版本号大小方法-start################################################################### -function version_gt() { - test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" -} -######################################对比版本版本号大小方法-end################################################################### - -#######################################通知用户更新镜像-start##################################################################### -echo "check docker images update..." -echo "检查docker镜像更新更新..." -if type jq >/dev/null 2>&1; then - echo "get dockerhub repo images labels..." - echo "获取dockerhub仓库镜像labels信息..." - labels=$(getDockerImageLabel) - export NOTIFY_CONTENT=$(echo $labels | jq -r .UPDATE_CONTENT) - version=$(echo $labels | jq -r .VERSION) +if [ $run_cmd ]; then + echo "Start crontab task main process..." + echo "启动crondtab定时任务主进程..." + crond -f else - # 第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知 - echo "Current container version is too old, send update notification" - echo "当前版本过旧,发送镜像更新通知" - export NOTIFY_CONTENT="更新内容较多,重新阅读仓库Readme(https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" - cd /scripts/docker - node notify_docker_user.js + echo "默认定时任务执行结束。" fi - -#通知通知用户更新镜像 -if [ ! $BUILD_VERSION ]; then - if [ $version ]; then - echo "Current container version is empty, dockerhub lastet $version, send update notification" - echo "当前容器版本为空,dockerhub仓库版本为$version,发送更新通知" - cd /scripts/docker - node notify_docker_user.js - fi -else - if version_gt $version $BUILD_VERSION; then - echo "Current container version $BUILD_VERSION, dockerhub lastet version $version, send update notification" - echo "当前容器版本为$BUILD_VERSION,dockerhub仓库版本为$version,发送通知" - cd /scripts/docker - node notify_docker_user.js - fi -fi -#######################################通知用户更新镜像-end##################################################################### - -##兼容旧镜像的环境变量 -if [ !$DEFAULT_LIST_FILE ]; then - defaultListFile="/scripts/docker/crontab_list.sh" -else - defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" -fi - -customListFile="/scripts/docker/$CUSTOM_LIST_FILE" -mergedListFile="/scripts/docker/merged_list_file.sh" - -if type ts >/dev/null 2>&1; then - echo 'moreutils tools installed, default task append |ts output' - echo '系统已安装moreutils工具包,默认定时任务增加|ts 输出' - ##复制一个新文件来追加|ts,防止git pull的时候冲突 - cp $defaultListFile /scripts/docker/default_list.sh - defaultListFile="/scripts/docker/default_list.sh" - - sed -i 's/>>/|ts >>/g' $defaultListFile -fi - -#判断 自定义文件是否存在 是否存在 -if [ $CUSTOM_LIST_FILE ]; then - echo "You have configured a custom list file: $CUSTOM_LIST_FILE, custom list merge type: $CUSTOM_LIST_MERGE_TYPE..." - echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." - if [ -f "$customListFile" ]; then - if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then - echo "merge default list file: $DEFAULT_LIST_FILE and custom list file: $CUSTOM_LIST_FILE" - echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" - cat $defaultListFile >$mergedListFile - echo -e "" >>$mergedListFile - cat $customListFile >>$mergedListFile - elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then - cat $customListFile >$mergedListFile - echo "merge custom list file: $CUSTOM_LIST_FILE..." - echo "合并自定义任务文件:$CUSTOM_LIST_FILE" - touch "$customListFile" - else - echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." - cat $defaultListFile >$mergedListFile - fi - else - echo "Not found custom list file: $CUSTOM_LIST_FILE ,use default list file: $DEFAULT_LIST_FILE" - echo "自定义任务文件:$CUSTOM_LIST_FILE 未找到,使用默认配置$DEFAULT_LIST_FILE..." - cat $defaultListFile >$mergedListFile - fi -else - echo "The currently used is the default crontab task file: $DEFAULT_LIST_FILE ..." - echo "当前使用的为默认定时任务文件 $DEFAULT_LIST_FILE ..." - cat $defaultListFile >$mergedListFile -fi - -# 判断最后要加载的定时任务是否包含默认定时任务,不包含的话就加进去 -if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then - echo "Merged crontab task file,the required default task is not included, append default task..." - echo "合并后的定时任务文件,未包含必须的默认定时任务,增加默认定时任务..." - echo -e >>$mergedListFile - echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile -fi - -if [ $RANDOM_DELAY_MAX -ge 1 ]; then - echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... " - sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reward.js\|jd_joy_steal.js\|jd_joy_feedPets.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile -fi - -echo "Load the latest crontab task file..." -echo "加载最新的定时任务文件..." -crontab $mergedListFile - -echo "Start crontab task main process..." -echo "启动crondtab定时任务主进程..." -crond -f diff --git a/docker/example/custom-append.yml b/docker/example/custom-append.yml index b685384d..fc3beea9 100644 --- a/docker/example/custom-append.yml +++ b/docker/example/custom-append.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -13,7 +13,14 @@ jd_scripts: - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/custom-overwrite.yml b/docker/example/custom-overwrite.yml index 9e920f7e..302528b7 100644 --- a/docker/example/custom-overwrite.yml +++ b/docker/example/custom-overwrite.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -13,7 +13,14 @@ jd_scripts: - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/default.yml b/docker/example/default.yml index e9716b16..d4c31b62 100644 --- a/docker/example/default.yml +++ b/docker/example/default.yml @@ -1,5 +1,5 @@ jd_scripts: - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -12,7 +12,14 @@ jd_scripts: volumes: - ./logs:/scripts/logs tty: true + # 因为更换仓库地址可能git pull的dns解析不到,可以在配置追加hosts + extra_hosts: + - "gitee.com:180.97.125.228" + - "github.com:13.229.188.59" + - "raw.githubusercontent.com:151.101.228.133" environment: + #脚本更新仓库地址,配置了会切换到对应的地址 + - REPO_URL=https://gitee.com/lxk0301/jd_scripts.git # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 #jd cookies # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX diff --git a/docker/example/docker多账户使用独立容器使用说明.md b/docker/example/docker多账户使用独立容器使用说明.md index b8267538..4fd879d3 100644 --- a/docker/example/docker多账户使用独立容器使用说明.md +++ b/docker/example/docker多账户使用独立容器使用说明.md @@ -1,16 +1,16 @@ -### 使用此方式,请先理解学会使用[docker办法一](https://github.com/lxk0301/jd_scripts/tree/master/docker#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95jd_scripts%E7%94%A8%E4%BA%8E%E5%AD%98%E6%94%BE%E5%A4%87%E4%BB%BD%E9%85%8D%E7%BD%AE%E7%AD%89%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E9%87%8D%E8%A3%85%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E6%95%B4%E4%B8%AAjd_scripts%E7%9B%AE%E5%BD%95%E5%8D%B3%E5%8F%AF)的使用方式 +### 使用此方式,请先理解学会使用[docker办法一](https://github.com/LXK9301/jd_scripts/tree/master/docker#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95jd_scripts%E7%94%A8%E4%BA%8E%E5%AD%98%E6%94%BE%E5%A4%87%E4%BB%BD%E9%85%8D%E7%BD%AE%E7%AD%89%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E9%87%8D%E8%A3%85%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E6%95%B4%E4%B8%AAjd_scripts%E7%9B%AE%E5%BD%95%E5%8D%B3%E5%8F%AF)的使用方式 > 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。 配置使用起来还是比较简单的,具体往下看 ### 文件夹目录参考 ![image](https://user-images.githubusercontent.com/6993269/97781779-885ae700-1bc8-11eb-93a4-b274cbd6062c.png) -### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/lxk0301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() +### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/LXK9301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() ![image](https://user-images.githubusercontent.com/6993269/97781610-a1af6380-1bc7-11eb-9397-903b47f5ad6b.png) #### `docker-compose.yml`文件参考 ```yaml version: "3" services: jd_scripts1: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -32,7 +32,7 @@ services: # - PLANT_BEAN_SHARECODES= jd_scripts2: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts2 tty: true @@ -43,7 +43,7 @@ services: - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ - TG_USER_ID=12xxxx206 jd_scripts4: #自定义追加默认之后 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts4 tty: true @@ -56,7 +56,7 @@ services: - TG_USER_ID=12xxxx206 - CUSTOM_LIST_FILE=my_crontab_list.sh jd_scripts5: #自定义覆盖默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts5 tty: true diff --git a/docker/example/jd_scripts.custom-append.syno.json b/docker/example/jd_scripts.custom-append.syno.json index e6fdce53..a2da16f2 100644 --- a/docker/example/jd_scripts.custom-append.syno.json +++ b/docker/example/jd_scripts.custom-append.syno.json @@ -31,7 +31,7 @@ ], "exporting" : false, "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/jd_scripts.custom-overwrite.syno.json b/docker/example/jd_scripts.custom-overwrite.syno.json index d75581f8..e4e05fb3 100644 --- a/docker/example/jd_scripts.custom-overwrite.syno.json +++ b/docker/example/jd_scripts.custom-overwrite.syno.json @@ -35,7 +35,7 @@ ], "exporting" : false, "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/jd_scripts.syno.json b/docker/example/jd_scripts.syno.json index 61acfd6e..189b047c 100644 --- a/docker/example/jd_scripts.syno.json +++ b/docker/example/jd_scripts.syno.json @@ -51,7 +51,7 @@ ], "exporting" : false, "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", - "image" : "akyakya/jd_scripts", + "image" : "lxk0301/jd_scripts", "is_ddsm" : false, "is_package" : false, "links" : [], diff --git a/docker/example/multi.yml b/docker/example/multi.yml index 64606cbc..a02de0d0 100644 --- a/docker/example/multi.yml +++ b/docker/example/multi.yml @@ -1,7 +1,7 @@ version: "3" services: jd_scripts1: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) # 经过实际测试,建议不低于200M # deploy: @@ -23,7 +23,7 @@ services: # - PLANT_BEAN_SHARECODES= jd_scripts2: #默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts2 tty: true @@ -34,7 +34,7 @@ services: - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ - TG_USER_ID=12xxxx206 jd_scripts4: #自定义追加默认之后 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts4 tty: true @@ -47,7 +47,7 @@ services: - TG_USER_ID=12xxxx206 - CUSTOM_LIST_FILE=my_crontab_list.sh jd_scripts5: #自定义覆盖默认 - image: akyakya/jd_scripts + image: lxk0301/jd_scripts restart: always container_name: jd_scripts5 tty: true diff --git a/getJDCookie.js b/getJDCookie.js index 0616f5a5..a2ea7d1b 100644 --- a/getJDCookie.js +++ b/getJDCookie.js @@ -1,8 +1,8 @@ /** * 扫码获取京东cookie,此方式得到的cookie有效期为90天(实际待测试) - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2021-01-13 12:12:40 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2021-01-13 12:22:54 * Modify from FanchangWang https://github.com/FanchangWang */ diff --git a/githubAction.md b/githubAction.md index 91fac4ed..6780d8b0 100644 --- a/githubAction.md +++ b/githubAction.md @@ -4,14 +4,14 @@ | Name | 归属 | 属性 | 说明 | | :---------------------: | :----------: | --------- | ------------------------------------------------------------ | -| `JD_COOKIE` | 京东 | 必须 | 京东cookie,多个账号的cookie使用`&`隔开或者换行。具体获取参考[浏览器获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](https://github.com/lxk0301/jd_scripts/blob/master/backUp/GetJdCookie2.md) | +| `JD_COOKIE` | 京东 | 必须 | 京东cookie,多个账号的cookie使用`&`隔开或者换行。具体获取参考[浏览器获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](https://github.com/LXK9301/jd_scripts/blob/master/backUp/GetJdCookie2.md) | ##### 京东隐私安全 环境变量 | Name | 归属 | 属性 | 说明 | | :---------------------: | :----------: | --------- | ------------------------------------------------------------ | | `JD_DEBUG` | 脚本打印log | 非必须 | 运行脚本时,是否显示log,默认显示。改成false表示不显示,注重隐私的人可以在设置secret -> `Name:JD_DEBUG,Value:false` | -| `JD_USER_AGENT` | 京东 | 非必须 | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。具体获取参考此[issue](https://github.com/lxk0301/jd_scripts/issues/127) | +| `JD_USER_AGENT` | 京东 | 非必须 | 自定义此库里京东系列脚本的UserAgent,不懂不知不会UserAgent的请不要随意填写内容。如需使用此功能建议填写京东APP的UA | ##### 推送通知环境变量(目前提供`微信server酱`、`pushplus(推送加)`、`iOS Bark APP`、`telegram机器人`、`钉钉机器人`、`企业微信机器人`、`iGot`、`QQ酷推`等通知方式) @@ -37,12 +37,12 @@ | Name | 归属 | 属性 | 说明 | | --------------------------- | ------------------ | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `FRUITSHARECODES` | 东东农场互助码 | 非必须 | 填写规则请看[jdFruitShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFruitShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | -| `PETSHARECODES` | 东东萌宠互助码 | 非必须 | 填写规则请看[jdPetShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPetShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | -| `PLANT_BEAN_SHARECODES` | 种豆得豆互助码 | 非必须 | 填写规则请看[jdPlantBeanShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdPlantBeanShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | -| `SUPERMARKET_SHARECODES` | 东东超市商圈互助码 | 非必须 | 填写规则请看[jdSuperMarketShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdSuperMarketShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | -| `DDFACTORY_SHARECODES` | 东东工厂互助码 | 非必须 | 填写规则请看[jdFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | -| `DREAM_FACTORY_SHARE_CODES` | 京喜工厂互助码 | 非必须 | 填写规则请看[jdDreamFactoryShareCodes.js](https://github.com/lxk0301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `FRUITSHARECODES` | 东东农场互助码 | 非必须 | 填写规则请看[jdFruitShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdFruitShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PETSHARECODES` | 东东萌宠互助码 | 非必须 | 填写规则请看[jdPetShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdPetShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `PLANT_BEAN_SHARECODES` | 种豆得豆互助码 | 非必须 | 填写规则请看[jdPlantBeanShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdPlantBeanShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `SUPERMARKET_SHARECODES` | 东东超市商圈互助码 | 非必须 | 填写规则请看[jdSuperMarketShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdSuperMarketShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `DDFACTORY_SHARECODES` | 东东工厂互助码 | 非必须 | 填写规则请看[jdFactoryShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | +| `DREAM_FACTORY_SHARE_CODES` | 京喜工厂互助码 | 非必须 | 填写规则请看[jdDreamFactoryShareCodes.js](https://github.com/LXK9301/jd_scripts/blob/master/jdDreamFactoryShareCodes.js)或见下方[互助码的填写规则](#互助码的填写规则) | | `JDZZ_SHARECODES` | 京东赚赚互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | | `JDJOY_SHARECODES` | 疯狂的JOY互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | | `BOOKSHOP_SHARECODES` | 京东书店互助码 | 非必须 | 填写规则和上面类似,或见下方[互助码的填写规则](#互助码的填写规则) | diff --git a/index.js b/index.js index c70aaa66..1e4ac780 100644 --- a/index.js +++ b/index.js @@ -16,7 +16,7 @@ exports.main_handler = async (event, context, callback) => { //}) //3.执行github远端的js文件(因github的raw类型的文件被墙,此方法云函数不推荐) - request('https://raw.githubusercontent.com/lxk0301/jd_scripts/master/' + v + '.js', function (error, response, body) { + request('https://raw.githubusercontent.com/LXK9301/jd_scripts/master/' + v + '.js', function (error, response, body) { eval(response.body) }) } diff --git a/jdCookie.js b/jdCookie.js index 0dcadb23..2112e2f7 100644 --- a/jdCookie.js +++ b/jdCookie.js @@ -2,12 +2,11 @@ 此文件为Node.js专用。其他用户请忽略 */ //此处填写京东账号cookie。 -//注:github action用户cookie填写到Settings-Secrets里面,新增JD_COOKIE,多个账号的cookie使用`&`隔开或者换行 let CookieJDs = [ '',//账号一ck,例:pt_key=XXX;pt_pin=XXX; '',//账号二ck,例:pt_key=XXX;pt_pin=XXX;如有更多,依次类推 ] -// 判断github action里面是否有京东ck +// 判断环境变量里面是否有京东ck if (process.env.JD_COOKIE) { if (process.env.JD_COOKIE.indexOf('&') > -1) { console.log(`您的cookie选择的是用&隔开\n`) @@ -19,6 +18,13 @@ if (process.env.JD_COOKIE) { 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 !== "" && item !== null && item !== undefined))] console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`); console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`) diff --git a/jdDreamFactoryShareCodes.js b/jdDreamFactoryShareCodes.js index 8092924b..b658af2e 100644 --- a/jdDreamFactoryShareCodes.js +++ b/jdDreamFactoryShareCodes.js @@ -4,12 +4,11 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 DREAM_FACTORY_SHARE_CODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let shareCodes = [ 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@Bo-jnVs_m9uBvbRzraXcSA==@-OvElMzqeyeGBWazWYjI1Q==',//账号一的好友shareCode,不同好友中间用@符号隔开 - '1uzRU5HkaUgvy0AB5Q9VUg==@PDPM257r_KuQhil2Y7koNw==@-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开 + '-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开 ] // 判断github action里面是否有京喜工厂互助码 if (process.env.DREAM_FACTORY_SHARE_CODES) { diff --git a/jdFactoryShareCodes.js b/jdFactoryShareCodes.js index 99a5008c..0c673c9a 100644 --- a/jdFactoryShareCodes.js +++ b/jdFactoryShareCodes.js @@ -4,7 +4,6 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let shareCodes = [ diff --git a/jdFruitShareCodes.js b/jdFruitShareCodes.js index d06c92d1..15076525 100644 --- a/jdFruitShareCodes.js +++ b/jdFruitShareCodes.js @@ -4,7 +4,6 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 FruitShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let FruitShareCodes = [ diff --git a/jdJxncShareCodes.js b/jdJxncShareCodes.js index 7f9f85da..6ca30334 100644 --- a/jdJxncShareCodes.js +++ b/jdJxncShareCodes.js @@ -5,7 +5,6 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写京京喜农场的好友码。 -// github action用户的好友助力码填写到Action->Settings->Secrets->new Secret里面(Name填写 JxncShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写助力码,填写规则如下) // 同一个京东账号的好友助力码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let JxncShareCodes = [ diff --git a/jdPetShareCodes.js b/jdPetShareCodes.js index f910ca29..5b0907cc 100644 --- a/jdPetShareCodes.js +++ b/jdPetShareCodes.js @@ -4,7 +4,6 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PetShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let PetShareCodes = [ diff --git a/jdPlantBeanShareCodes.js b/jdPlantBeanShareCodes.js index faba2b6b..19623e4c 100644 --- a/jdPlantBeanShareCodes.js +++ b/jdPlantBeanShareCodes.js @@ -4,12 +4,11 @@ 支持京东N个账号 */ //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 let PlantBeanShareCodes = [ '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy',//账号一的好友shareCode,不同好友中间用@符号隔开 - '4npkonnsy7xi3p6pjfxg6ct5gll42gmvnz7zgoy@6dygkptofggtp6ffhbowku3xgu@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开 + 'mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开 ] // 判断github action里面是否有种豆得豆互助码 if (process.env.PLANT_BEAN_SHARECODES) { diff --git a/jdSuperMarketShareCodes.js b/jdSuperMarketShareCodes.js deleted file mode 100644 index 880c8c86..00000000 --- a/jdSuperMarketShareCodes.js +++ /dev/null @@ -1,31 +0,0 @@ -/* -京小超互助码 -此文件为Node.js专用。其他用户请忽略 -支持京东N个账号 - */ -//云服务器腾讯云函数等Node.js用户在此处填写京小超商圈的好友码。 -// github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 SuperMarketShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) -// 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 -// 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 -let SuperMarketShareCodes = [ - '-4msulYas0O2JsRhE-2TA5XZmBQ@eU9Yar_mb_9z92_WmXNG0w@eU9YaejjYv4g8T2EwnsVhQ',//账号一的好友shareCode,不同好友中间用@符号隔开 - 'aURoM7PtY_Q@eU9Ya-y2N_5z9DvXwyIV0A@eU9YaOnjYK4j-GvWmXIWhA',//账号二的好友shareCode,不同好友中间用@符号隔开 -] -// 判断github action里面是否有京小超商圈互助码 -if (process.env.SUPERMARKET_SHARECODES) { - if (process.env.SUPERMARKET_SHARECODES.indexOf('&') > -1) { - console.log(`您的京小超商圈互助码选择的是用&隔开\n`) - SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split('&'); - } else if (process.env.SUPERMARKET_SHARECODES.indexOf('\n') > -1) { - console.log(`您的京小超商圈互助码选择的是用换行隔开\n`) - SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split('\n'); - } else { - SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split(); - } -} else if (process.env.JD_COOKIE) { - console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) -} -for (let i = 0; i < SuperMarketShareCodes.length; i++) { - const index = (i + 1 === 1) ? '' : (i + 1); - exports['SuperMarketShareCode' + index] = SuperMarketShareCodes[i]; -} \ No newline at end of file diff --git a/jd_bean_change.js b/jd_bean_change.js index 68f8af4a..81634293 100644 --- a/jd_bean_change.js +++ b/jd_bean_change.js @@ -1,11 +1,11 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-01 16:25:41 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-12-22 10:25:41 */ /* -京豆变动通知脚本:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js +京豆变动通知脚本:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js 统计昨日京豆的变化情况,包括收入,支出,以及显示当前京豆数量,目前小问题:下单使用京豆后,退款重新购买会出现异常 网页查看地址 : https://bean.m.jd.com/bean/signIndex.actionbeanDetail/index.action?resourceValue=bean 支持京东双账号 @@ -13,12 +13,12 @@ quantumultx [task_local] #京豆变动通知 -2 9 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知, enabled=true +2 9 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知, enabled=true Loon [Script] -cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知 +cron "2 9 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知 Surge -京豆变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=440,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js +京豆变动通知 = type=cron,cronexp=2 9 * * *,wake-system=1,timeout=440,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_change.js */ const $ = new Env('京豆变动通知'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_bean_home.js b/jd_bean_home.js index e0c40636..bb519491 100644 --- a/jd_bean_home.js +++ b/jd_bean_home.js @@ -2,23 +2,23 @@ 领京豆额外奖励&抢京豆 脚本自带助力码,介意者可将 29行 helpAuthor 变量设置为 false 入口:首页-领京豆 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #领京豆额外奖励 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_bean_home.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励 ===============Surge================= -领京豆额外奖励 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js +领京豆额外奖励 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js ============小火箭========= -领京豆额外奖励 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, cronexpr="10 7 * * *", timeout=200, enable=true +领京豆额外奖励 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bean_home.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('领京豆额外奖励'); diff --git a/jd_bean_sign.js b/jd_bean_sign.js index 206d220a..dda14051 100644 --- a/jd_bean_sign.js +++ b/jd_bean_sign.js @@ -1,3 +1,6 @@ +/* + * @Author: LXK9301 https://github.com/LXK9301 + */ /* 京豆签到,自用,可N个京东账号,IOS软件用户请使用 https://raw.githubusercontent.com/NobyDa/Script/master/JD-DailyBonus/JD_DailyBonus.js Node.JS专用 diff --git a/jd_blueCoin.js b/jd_blueCoin.js index c12334bd..4fb91213 100644 --- a/jd_blueCoin.js +++ b/jd_blueCoin.js @@ -1,5 +1,5 @@ /* -京小超兑换奖品 脚本地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js +京小超兑换奖品 脚本地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js 感谢@yangtingxiao提供PR 更新时间:2020-12-24 支持京东多个账号 @@ -7,12 +7,12 @@ ======================quantumultx=============== [task_local] #京小超兑换奖品 -0 0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js, tag=京小超兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true +0 0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js, tag=京小超兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxc.png, enabled=true ====================Loon================= [Script] -cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品 +cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品 ===================Surge================== -京小超兑换奖品 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js +京小超兑换奖品 = type=cron,cronexp="0 0 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js */ const $ = new Env('京小超兑换奖品'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_bookshop.js b/jd_bookshop.js index 0f927898..972f4d83 100644 --- a/jd_bookshop.js +++ b/jd_bookshop.js @@ -6,17 +6,17 @@ ============Quantumultx=============== [task_local] #口袋书店 -1 8,12,18 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js, tag=口袋书店, enabled=true +1 8,12,18 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js, tag=口袋书店, enabled=true ================Loon============== [Script] -cron "1 8,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js,tag=口袋书店 +cron "1 8,12,18 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js,tag=口袋书店 ===============Surge================= -口袋书店 = type=cron,cronexp="1 8,12,18 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js +口袋书店 = type=cron,cronexp="1 8,12,18 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js ============小火箭========= -口袋书店 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bookshop.js, cronexpr="1 8,12,18* * *", timeout=200, enable=true +口袋书店 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_bookshop.js, cronexpr="1 8,12,18* * *", timeout=200, enable=true */ const $ = new Env('口袋书店'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_car.js b/jd_car.js index 5878ea21..0c583467 100644 --- a/jd_car.js +++ b/jd_car.js @@ -2,23 +2,23 @@ 京东汽车,签到满500赛点可兑换500京豆,一天运行一次即可 长期活动 活动入口:首页👉京东汽车👉屏幕右中部,车主福利 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #京东汽车 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, tag=京东汽车 ===============Surge================= -京东汽车 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js +京东汽车 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js ============小火箭========= -京东汽车 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, cronexpr="10 7 * * *", timeout=200, enable=true +京东汽车 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('京东汽车'); diff --git a/jd_car_exchange.js b/jd_car_exchange.js index 9c453f8c..44de94e5 100644 --- a/jd_car_exchange.js +++ b/jd_car_exchange.js @@ -6,24 +6,24 @@ 京东APP:首页👉京东汽车兑换👉屏幕右中部,车主福利 活动网页地址:https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html#/journey -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange 已支持IOS, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #京东汽车兑换 -0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true ================Loon============== [Script] -cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换 +cron "0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, tag=京东汽车兑换 ===============Surge================= -京东汽车兑换 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=2000,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js +京东汽车兑换 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=2000,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js ============小火箭========= -京东汽车兑换 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car_exchange.js, cronexpr="0 0 * * *", timeout=2000, enable=true +京东汽车兑换 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_car_exchange.js, cronexpr="0 0 * * *", timeout=2000, enable=true */ const $ = new Env('京东汽车兑换'); diff --git a/jd_cash.js b/jd_cash.js index 107a9246..285a863b 100644 --- a/jd_cash.js +++ b/jd_cash.js @@ -7,17 +7,17 @@ ============Quantumultx=============== [task_local] #签到领现金 -2 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js, tag=签到领现金, enabled=true +2 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js, tag=签到领现金, enabled=true ================Loon============== [Script] -cron "2 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js,tag=签到领现金 +cron "2 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js,tag=签到领现金 ===============Surge================= -签到领现金 = type=cron,cronexp="2 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js +签到领现金 = type=cron,cronexp="2 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js ============小火箭========= -签到领现金 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_cash.js, cronexpr="2 0 * * *", timeout=200, enable=true +签到领现金 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_cash.js, cronexpr="2 0 * * *", timeout=200, enable=true */ const $ = new Env('签到领现金'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_club_lottery.js b/jd_club_lottery.js index a68db875..642ab546 100644 --- a/jd_club_lottery.js +++ b/jd_club_lottery.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 + * @Author: LXK9301 * @Date: 2020-11-03 20:35:07 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-23 12:27:09 摇京豆(京东APP首页-领京豆-摇京豆) 更新时间:2020-10-12 @@ -11,12 +11,12 @@ // QuantumultX [task_local] #摇京豆 - 5 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js, tag=摇京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png, enabled=true + 5 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js, tag=摇京豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyjd.png, enabled=true //Loon [Script] - cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js,tag=摇京豆 + cron "5 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js,tag=摇京豆 //Surge - 摇京豆 = type=cron,cronexp="5 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js + 摇京豆 = type=cron,cronexp="5 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_club_lottery.js * */ const $ = new Env('摇京豆'); diff --git a/jd_crazy_joy.js b/jd_crazy_joy.js index 7f0cd8ea..84364601 100644 --- a/jd_crazy_joy.js +++ b/jd_crazy_joy.js @@ -9,17 +9,17 @@ crazyJoy任务 ============Quantumultx=============== [task_local] #crazyJoy任务 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js, tag=crazyJoy任务, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js,tag=crazyJoy任务 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js,tag=crazyJoy任务 ===============Surge================= -crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js +crazyJoy任务 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js ============小火箭========= -crazyJoy任务 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy.js, cronexpr="10 7 * * *", timeout=200, enable=true +crazyJoy任务 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy.js, cronexpr="10 7 * * *", timeout=200, enable=true */ @@ -33,7 +33,7 @@ let helpSelf = false // 循环助力,默认关闭 let applyJdBean = 0; //疯狂的JOY京豆兑换,目前最小值为2000京豆,默认为 0 不开启京豆兑换 let cookiesArr = [], cookie = '', message = ''; const inviteCodes = [ - 'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE', + 'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE@KTZmB4gV4zirfc3eWGgXhA==@dtTXFsCQ3tCWnXkLY8gyL6t9zd5YaBeE@-c4jG-fMiNon5YWAJsFHL6t9zd5YaBeE@hxG_ozzxvNjPuPCbly1WtA==', 'EdLPh8A6X5G1iWXu-uPYfA==@0gUO7F7N-4HVDh9mdQC2hg==@fUJTgR9z26fXdQgTvt_bgqt9zd5YaBeE@nCQQXQHKGjPCb7jkd8q2U-aCTjZMxL3s@2boGLV7TonMex8-nrT6EGat9zd5YaBeE' ]; const randomCount = $.isNode() ? 10 : 5; diff --git a/jd_crazy_joy_coin.js b/jd_crazy_joy_coin.js index 3b18c8f3..fc0e89d4 100644 --- a/jd_crazy_joy_coin.js +++ b/jd_crazy_joy_coin.js @@ -8,17 +8,17 @@ crazy joy ============Quantumultx=============== [task_local] #crazyJoy挂机 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js, tag=crazyJoy挂机, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js, tag=crazyJoy挂机, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js,tag=crazyJoy挂机 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js,tag=crazyJoy挂机 ===============Surge================= -crazyJoy挂机 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js +crazyJoy挂机 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js ============小火箭========= -crazyJoy挂机 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_crazy_joy_coin.js, cronexpr="10 * * * *", timeout=200, enable=true +crazyJoy挂机 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_crazy_joy_coin.js, cronexpr="10 * * * *", timeout=200, enable=true */ @@ -166,6 +166,16 @@ if ($.isNode()) { return; } let count = 0 + + if (cookiesArr.length && $.isNode()) { + console.log(`\n挂机开始,自动8s收一次金币`); + //兼容iOS + setInterval(async () => { + const promiseArr = cookiesArr.map(ck => getCoinForInterval(ck)); + await Promise.all(promiseArr); + }, 8000); + } + while (true) { count++ console.log(`============开始第${count}次挂机=============`) @@ -182,7 +192,7 @@ if ($.isNode()) { $.log(`\n京东账号${$.index} ${$.nickName || $.UserName}\ncookie已过期,请重新登录获取\n`) continue } - await jdJxStory() + await jdCrazyJoy() } } $.log(`\n\n`) @@ -195,7 +205,7 @@ if ($.isNode()) { $.done(); }) -async function jdJxStory() { +async function jdCrazyJoy() { $.coin = 0 $.bean = 0 @@ -513,6 +523,35 @@ function getCoin() { }) } +// 需传入cookie,不能使用全局的cookie +function getCoinForInterval(taskCookie) { + return new Promise(async resolve => { + $.get(taskUrl('crazyJoy_joy_produce', '', taskCookie), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + // const userName = decodeURIComponent(taskCookie.match(/pt_pin=(.+?);/) && taskCookie.match(/pt_pin=(.+?);/)[1]) + // data = JSON.parse(data); + // if (data.data && data.data.tryMoneyJoyBeans) { + // console.log(`【京东账号 ${userName}】分红狗生效中,预计获得 ${data.data.tryMoneyJoyBeans} 京豆奖励`) + // } + // if (data.data) { + // $.log(`【京东账号 ${userName}】此次在线收益:获得 ${data.data['coins']} 金币`) + // } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} + function openBox(eventType = 'LUCKY_BOX_DROP', boxId) { let body = { eventType, "eventRecordId": boxId} return new Promise(async resolve => { @@ -525,9 +564,9 @@ function openBox(eventType = 'LUCKY_BOX_DROP', boxId) { if (safeGet(data)) { data = JSON.parse(data); if (data['success']) { - $.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes}, ${data.data.advertViewTimes > 0 ? '等待30秒' : '跳出'}`) + $.log(`点击幸运盒子成功,剩余观看视频次数:${data.data.advertViewTimes}, ${data.data.advertViewTimes > 0 ? '等待32秒' : '跳出'}`) if (data.data.advertViewTimes > 0) { - await $.wait(30000) + await $.wait(32000) await rewardBox(eventType, boxId); } } @@ -599,7 +638,7 @@ function getGrowState() { }) }) } -function taskUrl(functionId, body = '') { +function taskUrl(functionId, body = '', taskCookie = cookie) { let t = Date.now().toString().substr(0, 10) let e = body || "" e = $.md5("aDvScBv$gGQvrXfva8dG!ZC@DA70Y%lX" + e + t) @@ -607,7 +646,7 @@ function taskUrl(functionId, body = '') { return { url: `${JD_API_HOST}?uts=${e}&appid=crazy_joy&functionId=${functionId}&body=${escape(body)}&t=${t}`, headers: { - 'Cookie': cookie, + 'Cookie': taskCookie, 'Host': 'api.m.jd.com', 'Accept': '*/*', 'Connection': 'keep-alive', diff --git a/jd_daily_egg.js b/jd_daily_egg.js index 08919a2c..8664140f 100644 --- a/jd_daily_egg.js +++ b/jd_daily_egg.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-10 14:10:27 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-20 14:11:01 */ /* diff --git a/jd_dreamFactory.js b/jd_dreamFactory.js index 70be7994..1d1175e6 100644 --- a/jd_dreamFactory.js +++ b/jd_dreamFactory.js @@ -1,6 +1,6 @@ /* 京东京喜工厂 -更新时间:2021-1-9 +更新时间:2021-1-17 活动入口 :京东APP->游戏与互动->查看更多->京喜工厂 或者: 京东APP首页搜索 "玩一玩" ,造物工厂即可 @@ -10,17 +10,17 @@ ============Quantumultx=============== [task_local] #京喜工厂 -10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, enabled=true +10 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, enabled=true ================Loon============== [Script] -cron "10 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js,tag=京喜工厂 +cron "10 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js,tag=京喜工厂 ===============Surge================= -京喜工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js +京喜工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js ============小火箭========= -京喜工厂 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, cronexpr="10 * * * *", timeout=200, enable=true +京喜工厂 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_dreamFactory.js, cronexpr="10 * * * *", timeout=200, enable=true */ @@ -34,8 +34,14 @@ const randomCount = $.isNode() ? 20 : 5; let tuanActiveId = `6S9y4sJUfA2vPQP6TLdVIQ==`; const jxOpenUrl = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://wqsd.jd.com/pingou/dream_factory/index.html%22%20%7D`; let cookiesArr = [], cookie = '', message = ''; -const inviteCodes = ['V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@0WtCMPNq7jekehT6d3AbFw==', 'PDPM257r_KuQhil2Y7koNw==', "gB99tYLjvPcEFloDgamoBw==", '-OvElMzqeyeGBWazWYjI1Q==', 'GFwo6PntxDHH95ZRzZ5uAg==']; +const inviteCodes = [ + 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@0WtCMPNq7jekehT6d3AbFw==', + "gB99tYLjvPcEFloDgamoBw==", + '-OvElMzqeyeGBWazWYjI1Q==', + 'GFwo6PntxDHH95ZRzZ5uAg==' +]; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +$.tuanIds = []; if ($.isNode()) { Object.keys(jdCookieNode).forEach((item) => { cookiesArr.push(jdCookieNode[item]) @@ -83,6 +89,17 @@ if ($.isNode()) { await jdDreamFactory() } } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + console.log(`${$.UserName}去参加第一个cookie账号开的团`) + cookie = cookiesArr[i]; + if ($.tuanIds.length > 0) { + await JoinTuan($.tuanIds[0]); + } + await joinLeaderTuan();//参团 + } + } })() .catch((e) => { $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') @@ -94,7 +111,7 @@ if ($.isNode()) { async function jdDreamFactory() { await userInfo(); await QueryFriendList();//查询今日招工情况以及剩余助力次数 - await joinLeaderTuan();//参团 + // await joinLeaderTuan();//参团 await helpFriends(); if (!$.unActive) return await getUserElectricity(); @@ -893,6 +910,7 @@ async function tuanActivity() { } } } else { + $.tuanIds.push(tuanId); $.log(`\n此团未达领取团奖励人数:${tuanNum}人\n`) } } @@ -1186,7 +1204,7 @@ function tuanAward(activeId, tuanId, isTuanLeader = true) { }) }) } -function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') { +function updateTuanIds(url = 'https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_updateFactoryTuanId.json') { return new Promise(resolve => { $.get({url}, (err, resp, data) => { try { @@ -1203,7 +1221,7 @@ function updateTuanIds(url = 'https://raw.githubusercontent.com/lxk0301/updateTe }) }) } -function updateTuanIdsCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateFactoryTuanId.json') { +function updateTuanIdsCDN(url) { return new Promise(async resolve => { $.get({url, headers:{ @@ -1300,7 +1318,7 @@ async function showMsg() { function readShareCode() { console.log(`开始`) return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/jxfactory/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/jxfactory/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -1345,7 +1363,7 @@ function requireConfig() { return new Promise(async resolve => { await updateTuanIdsCDN('https://gitee.com/lxk0301/updateTeam/raw/master/jd_updateFactoryTuanId.json'); if (!$.tuanIdS) await updateTuanIds(); - if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/lxk0301/updateTeam@master/jd_updateFactoryTuanId.json'); + if (!$.tuanIdS) await updateTuanIdsCDN('https://cdn.jsdelivr.net/gh/LXK9301/updateTeam@master/jd_updateFactoryTuanId.json'); if ($.tuanIdS && $.tuanIdS.tuanActiveId) { tuanActiveId = $.tuanIdS.tuanActiveId; } diff --git a/jd_family.js b/jd_family.js index 7608e23f..6f29ca09 100644 --- a/jd_family.js +++ b/jd_family.js @@ -4,7 +4,27 @@ * @Last Modified by: shylocks * @Last Modified time: 2021-01-13 13:27:41 */ +/* +京东家庭号 +活动入口:玩一玩-家庭号 +8000幸福值可换100京豆,一天任务做完大概300幸福值,周期较长 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东家庭号 +1 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js, tag=京东家庭号, enabled=true +================Loon============== +[Script] +cron "1 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js,tag=京东家庭号 + +===============Surge================= +京东家庭号 = type=cron,cronexp="1 * * * *",wake-system=1,timeout=2220,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js + +============小火箭========= +京东家庭号 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_family.js, cronexpr="1 * * * *", timeout=2200, enable=true + */ const $ = new Env('京东家庭号'); const notify = $.isNode() ? require('./sendNotify') : ''; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; diff --git a/jd_fruit.js b/jd_fruit.js index 99ce136f..ccc90176 100644 --- a/jd_fruit.js +++ b/jd_fruit.js @@ -1,5 +1,5 @@ /* -东东水果:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js +东东水果:脚本更新地址 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js 更新时间:2021-1-9 东东农场活动链接:https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html 已支持IOS双京东账号,Node.js支持N个京东账号 @@ -9,16 +9,16 @@ ==========================Quantumultx========================= [task_local] #jd免费水果 -5 6-18/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true +5 6-18/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js, tag=东东农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png, enabled=true =========================Loon============================= [Script] -cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,tag=东东农场 +cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js,tag=东东农场 =========================Surge============================ -东东农场 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js +东东农场 = type=cron,cronexp="5 6-18/6 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js =========================小火箭=========================== -东东农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js, cronexpr="5 6-18/6 * * *", timeout=200, enable=true +东东农场 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js, cronexpr="5 6-18/6 * * *", timeout=200, enable=true jd免费水果 搬的https://github.com/liuxiaoyucc/jd-helper/blob/a6f275d9785748014fc6cca821e58427162e9336/fruit/fruit.js */ @@ -29,7 +29,7 @@ let cookiesArr = [], cookie = '', jdFruitShareArr = [], isBox = false, notify, n //下面给出两个账号的填写示例(iOS只支持2个京东账号) let shareCodes = [ // 这个列表填入你要助力的好友的shareCode //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 - '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a@', + '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a@b9d287c974cc498d94112f1b064cf934', //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 'b1638a774d054a05a30a17d3b4d364b8@f92cb56c6a1349f5a35f0372aa041ea0@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3@2673c3777d4443829b2a635059953a28', ] @@ -78,44 +78,50 @@ const urlSchema = `openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%2 $.done(); }) async function jdFruit() { - await initForFarm(); - if ($.farmInfo.farmUserPro) { - // option['media-url'] = $.farmInfo.farmUserPro.goodsImage; - subTitle = `【京东账号${$.index}】${$.nickName}`; - message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`; - console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`); - console.log(`\n【已成功兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`); - message += `【已兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`; - await masterHelpShare();//助力好友 - if ($.farmInfo.treeState === 2 || $.farmInfo.treeState === 3) { - option['open-url'] = urlSchema; - $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看`); + subTitle = `【京东账号${$.index}】${$.nickName}`; + try { + await initForFarm(); + if ($.farmInfo.farmUserPro) { + // option['media-url'] = $.farmInfo.farmUserPro.goodsImage; + message = `【水果名称】${$.farmInfo.farmUserPro.name}\n`; + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.farmInfo.farmUserPro.shareCode}\n`); + console.log(`\n【已成功兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`); + message += `【已兑换水果】${$.farmInfo.farmUserPro.winTimes}次\n`; + await masterHelpShare();//助力好友 + if ($.farmInfo.treeState === 2 || $.farmInfo.treeState === 3) { + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}水果已可领取`, `【京东账号${$.index}】${$.nickName || $.UserName}\n【提醒⏰】${$.farmInfo.farmUserPro.name}已可领取\n请去京东APP或微信小程序查看`); + } + return + } else if ($.farmInfo.treeState === 1) { + console.log(`\n${$.farmInfo.farmUserPro.name}种植中...\n`) + } else if ($.farmInfo.treeState === 0) { + //已下单购买, 但未开始种植新的水果 + option['open-url'] = urlSchema; + $.msg($.name, ``, `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果\n点击弹窗即达`, option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 您忘了种植新的水果`, `京东账号${$.index} ${$.nickName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果`); + } + return } - return - } else if ($.farmInfo.treeState === 1){ - console.log(`\n${$.farmInfo.farmUserPro.name}种植中...\n`) - } else if ($.farmInfo.treeState === 0) { - //已下单购买, 但未开始种植新的水果 - option['open-url'] = urlSchema; - $.msg($.name, ``, `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果\n点击弹窗即达`, option); - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 您忘了种植新的水果`, `京东账号${$.index} ${$.nickName}\n【提醒⏰】您忘了种植新的水果\n请去京东APP或微信小程序选购并种植新的水果`); - } - return + await doDailyTask(); + await doTenWater();//浇水十次 + await getFirstWaterAward();//领取首次浇水奖励 + await getTenWaterAward();//领取10浇水奖励 + await getWaterFriendGotAward();//领取为2好友浇水奖励 + await duck(); + await doTenWaterAgain();//再次浇水 + await predictionFruit();//预测水果成熟时间 + } else { + console.log(`初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify($.farmInfo)}`); + message = `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【数据异常】请手动登录京东app查看此账号${$.name}是否正常`; } - await doDailyTask(); - await doTenWater();//浇水十次 - await getFirstWaterAward();//领取首次浇水奖励 - await getTenWaterAward();//领取10浇水奖励 - await getWaterFriendGotAward();//领取为2好友浇水奖励 - await duck(); - await doTenWaterAgain();//再次浇水 - await predictionFruit();//预测水果成熟时间 - } else { - console.log(`初始化农场数据异常, 请登录京东 app查看农场0元水果功能是否正常,农场初始化数据: ${JSON.stringify($.farmInfo)}`); - message = `【京东账号${$.index}】 ${$.nickName || $.UserName}\n【数据异常】请手动登录京东app查看此账号${$.name}是否正常`; + } catch (e) { + console.log(`任务执行异常,请检查执行日志 ‼️‼️`); + message = `任务执行异常,请检查执行日志 ‼️‼️`; + $.logErr(e); } await showMsg(); } @@ -1240,7 +1246,7 @@ function timeFormat(time) { } function readShareCode() { return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/farm/read/${randomCount}/`, timeout: 10000,}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/farm/read/${randomCount}/`, timeout: 10000,}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -1297,7 +1303,13 @@ function requireConfig() { }) if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; } else { - cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]); + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); } console.log(`共${cookiesArr.length}个京东账号\n`) if ($.isNode()) { @@ -1429,5 +1441,16 @@ function taskUrl(function_id, body = {}) { timeout: 10000, } } +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} // prettier-ignore function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,o)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=e&&e.timeout?e.timeout:o;const[r,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),h=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t))}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",o){const r=t=>{if(!t||!this.isLoon()&&this.isSurge())return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(o)):this.isQuanX()&&$notify(e,s,i,r(o)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_get_share_code.js b/jd_get_share_code.js index e7ca9fe7..2daaabdd 100644 --- a/jd_get_share_code.js +++ b/jd_get_share_code.js @@ -2,23 +2,23 @@ 一键获取我仓库所有需要互助类脚本的互助码(邀请码)(其中京东赚赚jd_jdzz.js如果今天达到5人助力则不能提取互助码) 没必要设置(cron)定时执行,需要的时候,自己手动执行一次即可 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #获取互助码 -20 13 * * 6 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码, enabled=true +20 13 * * 6 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码, enabled=true ================Loon============== [Script] -cron "20 13 * * 6" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码 +cron "20 13 * * 6" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js, tag=获取互助码 ===============Surge================= -获取互助码 = type=cron,cronexp="20 13 * * 6",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js +获取互助码 = type=cron,cronexp="20 13 * * 6",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js ============小火箭========= -获取互助码 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_get_share_code.js, cronexpr="20 13 * * 6", timeout=200, enable=true +获取互助码 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_get_share_code.js, cronexpr="20 13 * * 6", timeout=200, enable=true */ const $ = new Env("获取互助码"); const JD_API_HOST = "https://api.m.jd.com/client.action"; diff --git a/jd_jdfactory.js b/jd_jdfactory.js index d1de85b2..5c56b1c0 100644 --- a/jd_jdfactory.js +++ b/jd_jdfactory.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-12-06 18:19:21 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-12-26 22:58:02 */ /* @@ -16,17 +16,17 @@ ============Quantumultx=============== [task_local] #京东工厂 -10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, tag=东东工厂, enabled=true +10 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js, tag=东东工厂, enabled=true ================Loon============== [Script] -cron "10 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js,tag=东东工厂 +cron "10 * * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js,tag=东东工厂 ===============Surge================= -东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js +东东工厂 = type=cron,cronexp="10 * * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js ============小火箭========= -东东工厂 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, cronexpr="10 * * * *", timeout=200, enable=true +东东工厂 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js, cronexpr="10 * * * *", timeout=200, enable=true */ const $ = new Env('东东工厂'); @@ -501,7 +501,7 @@ function queryVkComponent() { "Content-Type": `application/x-www-form-urlencoded`, "Accept-Encoding": `gzip, deflate, br`, "Host": `api.m.jd.com`, - "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"), + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", "Accept-Language": `zh-Hans-CN;q=1, en-CN;q=0.9`, }, "timeout": 10000, @@ -622,7 +622,7 @@ function jdfactory_getHomeData() { function readShareCode() { console.log(`开始`) return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/ddfactory/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/ddfactory/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -689,13 +689,18 @@ function taskPostUrl(function_id, body = {}, function_id2) { } return { url, - body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=9.1.0`, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.1.0`, headers: { + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Content-Type": "application/x-www-form-urlencoded", "Cookie": cookie, - "origin": "https://h5.m.jd.com", - "referer": "https://h5.m.jd.com/", - 'Content-Type': 'application/x-www-form-urlencoded', - "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"), + "Host": "api.m.jd.com", + "Origin": "https://h5.m.jd.com", + "Referer": "https://h5.m.jd.com/babelDiy/Zeus/2uSsV2wHEkySvompfjB43nuKkcHp/index.html", + "User-Agent": "jdapp;iPhone;9.3.4;14.3;88732f840b77821b345bf07fd71f609e6ff12f43;network/4g;ADID/1C141FDD-C62F-425B-8033-9AAB7E4AE6A3;supportApplePay/0;hasUPPay/0;hasOCPay/0;model/iPhone11,8;addressid/2005183373;supportBestPay/0;appBuild/167502;jdSupportDarkMode/0;pv/414.19;apprpd/Babel_Native;ref/TTTChannelViewContoller;psq/5;ads/;psn/88732f840b77821b345bf07fd71f609e6ff12f43|1701;jdv/0|iosapp|t_335139774|appshare|CopyURL|1610885480412|1610885486;adk/;app_device/IOS;pap/JA2015_311210|9.3.4|IOS 14.3;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1", }, timeout: 10000, } diff --git a/jd_jdzz.js b/jd_jdzz.js index 1551f02c..f2b01ce2 100644 --- a/jd_jdzz.js +++ b/jd_jdzz.js @@ -8,17 +8,17 @@ ============Quantumultx=============== [task_local] # 京东赚赚 -0 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png, enabled=true +0 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzz.png, enabled=true ================Loon============== [Script] -cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js,tag=京东赚赚 +cron "0 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js,tag=京东赚赚 ===============Surge================= -京东赚赚 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js +京东赚赚 = type=cron,cronexp="0 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js ============小火箭========= -京东赚赚 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, cronexpr="0 0 * * *", timeout=200, enable=true +京东赚赚 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdzz.js, cronexpr="0 0 * * *", timeout=200, enable=true */ const $ = new Env('京东赚赚'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_joy.js b/jd_joy.js index 6329c53e..b5b53d26 100644 --- a/jd_joy.js +++ b/jd_joy.js @@ -11,12 +11,12 @@ Combine from Zero-S1/JD_tools(https://github.com/Zero-S1/JD_tools) // quantumultx // [task_local] // #京东宠汪汪 -// 15 */2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js, tag=京东宠汪汪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +// 15 */2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js, tag=京东宠汪汪, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true // Loon // [Script] -// cron "15 */2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js,tag=京东宠汪汪 +// cron "15 */2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js,tag=京东宠汪汪 // Surge -// 京东宠汪汪 = type=cron,cronexp="15 */2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js +// 京东宠汪汪 = type=cron,cronexp="15 */2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js const $ = new Env('宠汪汪'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/jd_joy_feedPets.js b/jd_joy_feedPets.js index 7a107bd0..fe46fafa 100644 --- a/jd_joy_feedPets.js +++ b/jd_joy_feedPets.js @@ -7,12 +7,12 @@ // quantumultx // [task_local] // #京东宠汪汪喂食 -// 15 */1 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js, tag=京东宠汪汪喂食, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +// 15 */1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js, tag=京东宠汪汪喂食, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true // Loon // [Script] -// cron "15 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js,tag=京东宠汪汪喂食 +// cron "15 */1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js,tag=京东宠汪汪喂食 // Surge -// 京东宠汪汪喂食 = type=cron,cronexp="15 */1 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js +// 京东宠汪汪喂食 = type=cron,cronexp="15 */1 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_feedPets.js const $ = new Env('宠汪汪🐕喂食'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_joy_help.js b/jd_joy_help.js index 3641d891..a6aa2996 100644 --- a/jd_joy_help.js +++ b/jd_joy_help.js @@ -1,7 +1,7 @@ /** 宠汪汪强制为别人助力(助力一个好友你自己可以获得30积分,一天上限是帮助3个好友,自己获得90积分,不管助力是否成功,对方都会成为你的好友) -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js -更新时间:2020-11-12 +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js +更新时间:2021-1-17 目前提供了304位好友的friendPin供使用。脚本随机从里面获取一个,助力成功后,退出小程序重新点击进去开始助力新的好友 欢迎大家使用 https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 (currentPage=1表示第一页好友,=2表示第二页好友) 提供各自账号列表的friendPin给我 @@ -15,15 +15,15 @@ hostname = draw.jdfcloud.com ======================Surge===================== [Script] -宠汪汪强制为别人助力= type=http-request,pattern= ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js +宠汪汪强制为别人助力= type=http-request,pattern= ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js ===================圈x===================== [rewrite_local] -^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js +^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin url script-request-header https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js =====================LOON===================== [Script] -http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js, requires-body=true, timeout=10, tag=宠汪汪强制为别人助力 +http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_help.js, requires-body=true, timeout=10, tag=宠汪汪强制为别人助力 你也可从下面链接拿好友的friendPin(复制链接到有京东ck的浏览器打开即可) @@ -31,13 +31,16 @@ http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/pet\/enterRoom\/h5\?re https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 **/ let url = $request.url -const friendsArr = ["yhr_19820404", "13008094886_p", "13966269193_p", "jd_4e4d9825e5fb1", "jd_5ff306cf94512", "ququkoko", "jd_59a9823f35496", "529577509-275616", "18923155789_p", "jd_455da88071d1e", "dreamscometrue5120", "蒋周南19620607", "jd_620ceca400151", "杉雨2011", "MARYMY88", "13682627696_p", "jd_6777ee65f9fcc", "夏海东12315", "jd_437b4f3fa5d83", "zyjyc9998", "meoygua", "MLHK7288", "jd_42d9ce3001acd", "jd_57650a30ef6eb", "jd_44ca1016e0f96", "jd_74332d1d62a97", "jd_7dbe4f8a40a7d", "jd_4fa238e4e3039", "elbereth1122", "jd_4d9be23908e41", "jd_51f0d43d78900", "13588108107_p", "123by456", "09niuniuma", "143798682-947527", "jd_560c6f30e6951", "jd_54ddb8af5374a", "夏革平", "247466310", "wang2011", "chensue", "1362245003-624122", "wdGefYCBlyOuvz", "jd_412f7eb363cd8", "18311575050_p", "1307976-34738981", "wdgOGLtOJjjbnp", "klhzdx", "jd_5fdcdcb183d7d", "jd_5862fd8834680", "jd_6cd93e613b0e5", "jd_51a64a9da6b94", "302990512-553401", "jd_4078f69a72873", "jd_ewYCRdmukzQH", "13348822441_p", "hlcx86021", "390823571-784974", "jd_79af2bc7a56a3", "15053231812_p", "jd_6f53253d117c5", "jd_5bf29dffa62ea", "jd_47a1c4ad02103", "刘凤苓", "145391572-102667", "yanglan0409", "jd_4b8a70f3b06c3", "弑神X", "jd_59d962a076126", "sjw3000", "jd_4d4def8b59787", "L1518235423", "jd_579b891fbea9b", "frank818", "hellohuhua", "jd_4cf1918577871", "jd_akYbyiXqrIDC", "李纪红", "jd_54a4260ca986c", "jd_4cba35cfa8220", "13654075776_p", "13916051043", "jd_6f9b9a6769afb", "iamkgbfox", "jd_5fbda9be54d5b", "jd_76763ba485c5e", "jd_45a6b5953b15b", "jd_485c757b79422", "xiaojingang_0", "lanye1545", "chenzhiyun2002", "lmpbjs1988", "jd_SmPxpudoGYOb", "jwl19690905", "荷舞弄清影88", "jd_750d6a9734717", "jd_64e37854e713f", "jd_573c9832d8989", "wdkplHVQlgowTW", "wwk232323", "jd_6bfe51f915c90", "我手机号码", "13681610268_p", "ss836580793", "15868005933_p", "zooooo58", "陌上花开花又落", "jd_701f52f8badbb", "jd_462f9229c20e4", "jd_42193689987a0", "jd_7dc5829121bcc", "13656692651_phz", "jd_47f49f22f1dc3", "handechun959", "13775208986_p", "guoyizhang", "jd_677dd20bf2749", "被折叠的记忆33", "jd_FfAnqFVEoBul", "jd_4e59841cae4f9", "jd_5279d593e7803", "思绪随风2011", "jd_62e335d785872", "suyugen", "jd_4e68b48d16f7b", "jd_56b7a4e092e85", "cocoty", "jd_7b6d6e7dc98f1", "jd_63423cd594e8b", "greatyunyun", "4349小丢丢", "18027486801_p", "15207695569_p", "llbai11", "wdNRUvbJItetlvB", "jd_54154982c707f", "85192cool", "jd_60d497271825b", "greatyunyun9320", "ky252571504", "jd_74e60dbcae365", "wdiicnSbYSHWwE", "jd_529a0a309d418", "jd_7be92b11b7e8f", "13486659225_p", "jd_iFnquhpWWAzO", "jd_6e348ece13e20", "jd_6f5b49bb757cb", "znz传奇", "418001066_m", "jd_67ded5748c3ab", "361372-27819972", "jd_5fafb631c98af", "jd_76dd04e844d63", "小鹿Jenny", "00数字方程式", "jd_77a82b603c6c3", "勇敢的小泪", "jd_4481f68984466", "jd_758f5224ee957", "mwb1992062_m", "15975229552_p", "zdj8341", "pet_virtual_friend_胡皋三", "pet_virtual_friend_绿茶sama", "pet_virtual_friend_Ainio", "jd_4915949b7bfa1", "jd_7ca74ed9224ef", "jd_42764f5ea2341", "5317123-63418293", "jd_40a2d9485cbdb", "qazmcl1230", "jd_7ced325aba4fd", "jd_402fe7425fcaf", "95581245-627991", "luffy-314_m", "jd_BCXgLlmxHdiS", "jd_610b3d00928e5", "你要醒来", "338379384-148135", "pet_virtual_friend_乔治桑", "jd_54130a3e282ea", "jd_6169b3411ed5b", "jd_428d930ca56a5", "qq6924309", "pet_virtual_friend_路遇狗与少年", "jd_712bd3bfd55d6", "jd_4e97fe5ca4003", "tommy_he1", "13981372001_p", "129867657-673064", "jd_525d6e7a57e7c", "wdZuirGekSHKmF", "jd_75e1da74980ab", "jd_RVMXldNSQNOP", "jd_5f94da0265e0d", "jd_67ab629be7e61", "13887490621_p", "jd_4e0d529ba3c35", "jd_493918e314b50", "jd_71a220104187a", "jd_vVhhkdUpTkJQ", "gary388jingdong", "wdjQkAbFobMTyo", "cloud_kim", "jd_558ed75f52d39", "15555448319_p", "wdhxZuEvXhhvCf", "jd_72b940be8c0f4", "congcong炒葱葱", "jd_7eb0de64eb25a", "13209558123_p", "jd_53bf7cb6fb8e6", "jd_4fe620f72fa7c", "夏雨的爱情", "jd_47ba82eb392a5", "jd_LXnFHXoJwXkW", "62160785-578856", "醒醒该睡了", "jd_LOEWgvNwQIWD", "xiiirww", "pet_virtual_friend_特兰克斯", "pet_virtual_friend_Talon", "jd_4f7cd5b108733", "jd_NgNWXMVkJIvk", "jadonglin", "玩家卫弈", "liangxuejingdong", "jd_627171efb7c0a", "jd_53bc7a14f64d6", "15809290902_p", "jd_65a2ab73d9aa5", "jd_6edb943cacbfb", "jd_7f7eabc5caf7d", "jd_725e17effb6a9", "蔡辉煌", "voxb", "gdxx_hhw_m", "jd_78f0d6524a1dc", "jd_sDtnONLeHwfG", "xyyshy1983", "yinlang46", "ypqian", "15817094457_p", "fdxwb", "wuyaoxin2012", "明子溪", "henry1927_m", "chamy99", "jd_461e384274c34", "248358330-645106", "jd_4fd63de4a6033", "蜜糖向日葵", "wonghe", "36453197-121619", "琳琅满目cbb", "jd_5b7cc9e532426", "134795344-89911673", "15211488203_p", "jd_6f1f0722f8365", "jd_JmGCpqgpCtqG", "墨明棋妙陈", "pet_virtual_friend_1314爱澳", "1209815-33190621", "zhouhuayh", "jd_6d3cbb8b0751a", "jd_6e00e826f939b", "jd_704a2e5e28a66", "mztvip", "davidharry", "sara35424", "sun5025", "jd_62ce2385bb364", "352834026-406289", "pet_virtual_friend_丁座的真爱粉", "jd_582eecf8d27a9", "jd_49acdb02e8514", "13976911784_p", "jd_uGzohbhFpRuz", "wzywolfgang", "yjbonny", "沧海不轮回", "649297742_327799447", "倚兰椒", "琳琳8796", "snzh2013", "jd_73751adc04afd", "wdNnlMzPGJJKgqI", "yygt1158", "jd_53df36eb204a0", "花开花花落", "jd_611e082213c89", "jd_71e77d9235cf5", "jd_596fd9fea411f", "jd_7277d200aa1ac", "15230573701_p", "zb19881021", "692620136落", "168876810-159969", "zhushidan100", "上自习的猪", "15602231009_p", "jd_5213fd3fd5e09", "jd_6711f97ee4dfe", "44787591-640051", "MisterGlasses", "jd_7b22bbfe1e7e5", "138555963-81748582", "jd_QEVVkkDTQAlJ", "4932713-24535180", "jd_6dce98c07a644", "jd_DUtPtiiDamDr", "wangyneu", "wBm1TsDy3p_m", "jd_6acd3a6cc79cc","jd_444f5c020f31c","jd_71caf6b3ec4cb", "shin_dynasty", "carola82", "jd_AOhLSBLdSnux", "ningbormb"] -//随机生成m(小)到n(大)的数,包含m和n -function randomFriendPin(m,n) { - return Math.round(Math.random()*(n - m) + m); +const friendsArr = ["jd_41345a6f96aa5", "jd_45a6b5953b15b", "jd_45a6b5953b15b", "jd_704a2e5e28a66", "jd_66f5cecc1efcd", "jd_sIhNpDXJehOr", "jd_5851f32d4a083", "yhr_19820404", "13008094886_p", "13966269193_p", "jd_4e4d9825e5fb1", "jd_5ff306cf94512", "ququkoko", "jd_59a9823f35496", "529577509-275616", "18923155789_p", "jd_455da88071d1e", "dreamscometrue5120", "蒋周南19620607", "jd_620ceca400151", "杉雨2011", "MARYMY88", "13682627696_p", "jd_6777ee65f9fcc", "夏海东12315", "jd_437b4f3fa5d83", "zyjyc9998", "meoygua", "MLHK7288", "jd_42d9ce3001acd", "jd_57650a30ef6eb", "jd_44ca1016e0f96", "jd_74332d1d62a97", "jd_7dbe4f8a40a7d", "jd_4fa238e4e3039", "elbereth1122", "jd_4d9be23908e41", "jd_51f0d43d78900", "13588108107_p", "123by456", "09niuniuma", "143798682-947527", "jd_560c6f30e6951", "jd_54ddb8af5374a", "夏革平", "247466310", "wang2011", "chensue", "1362245003-624122", "wdGefYCBlyOuvz", "jd_412f7eb363cd8", "18311575050_p", "1307976-34738981", "wdgOGLtOJjjbnp", "klhzdx", "jd_5fdcdcb183d7d", "jd_5862fd8834680", "jd_51a64a9da6b94", "302990512-553401", "jd_4078f69a72873", "jd_ewYCRdmukzQH", "13348822441_p", "hlcx86021", "390823571-784974", "jd_79af2bc7a56a3", "15053231812_p", "jd_6f53253d117c5", "jd_5bf29dffa62ea", "jd_47a1c4ad02103", "刘凤苓", "145391572-102667", "yanglan0409", "jd_4b8a70f3b06c3", "弑神X", "jd_59d962a076126", "sjw3000", "jd_4d4def8b59787", "L1518235423", "jd_579b891fbea9b", "frank818", "hellohuhua", "jd_4cf1918577871", "jd_akYbyiXqrIDC", "李纪红", "jd_54a4260ca986c", "jd_4cba35cfa8220", "13654075776_p", "13916051043", "jd_6f9b9a6769afb", "iamkgbfox", "jd_5fbda9be54d5b", "jd_76763ba485c5e", "jd_485c757b79422", "xiaojingang_0", "lanye1545", "chenzhiyun2002", "lmpbjs1988", "jd_SmPxpudoGYOb", "jwl19690905", "荷舞弄清影88", "jd_750d6a9734717", "jd_64e37854e713f", "jd_573c9832d8989", "wdkplHVQlgowTW", "wwk232323", "jd_6bfe51f915c90", "我手机号码", "13681610268_p", "ss836580793", "15868005933_p", "zooooo58", "陌上花开花又落", "jd_701f52f8badbb", "jd_462f9229c20e4", "jd_42193689987a0", "jd_7dc5829121bcc", "13656692651_phz", "jd_47f49f22f1dc3", "handechun959", "13775208986_p", "guoyizhang", "jd_677dd20bf2749", "jd_FfAnqFVEoBul", "jd_4e59841cae4f9", "jd_5279d593e7803", "思绪随风2011", "jd_62e335d785872", "suyugen", "jd_4e68b48d16f7b", "jd_56b7a4e092e85", "cocoty", "jd_7b6d6e7dc98f1", "jd_63423cd594e8b", "greatyunyun", "4349小丢丢", "18027486801_p", "15207695569_p", "llbai11", "wdNRUvbJItetlvB", "jd_54154982c707f", "85192cool", "jd_60d497271825b", "greatyunyun9320", "ky252571504", "jd_74e60dbcae365", "wdiicnSbYSHWwE", "jd_529a0a309d418", "jd_7be92b11b7e8f", "13486659225_p", "jd_iFnquhpWWAzO", "jd_6e348ece13e20", "jd_6f5b49bb757cb", "znz传奇", "418001066_m", "jd_67ded5748c3ab", "361372-27819972", "jd_5fafb631c98af", "jd_76dd04e844d63", "小鹿Jenny", "00数字方程式", "jd_77a82b603c6c3", "勇敢的小泪", "jd_4481f68984466", "jd_758f5224ee957", "mwb1992062_m", "15975229552_p", "zdj8341", "pet_virtual_friend_胡皋三", "pet_virtual_friend_绿茶sama", "pet_virtual_friend_Ainio", "jd_4915949b7bfa1", "jd_7ca74ed9224ef", "jd_42764f5ea2341", "5317123-63418293", "jd_40a2d9485cbdb", "qazmcl1230", "jd_7ced325aba4fd", "jd_402fe7425fcaf", "95581245-627991", "luffy-314_m", "jd_BCXgLlmxHdiS", "jd_610b3d00928e5", "你要醒来", "338379384-148135", "pet_virtual_friend_乔治桑", "jd_54130a3e282ea", "jd_6169b3411ed5b", "jd_428d930ca56a5", "qq6924309", "pet_virtual_friend_路遇狗与少年", "jd_712bd3bfd55d6", "jd_4e97fe5ca4003", "tommy_he1", "13981372001_p", "129867657-673064", "jd_525d6e7a57e7c", "wdZuirGekSHKmF", "jd_75e1da74980ab", "jd_RVMXldNSQNOP", "jd_5f94da0265e0d", "jd_67ab629be7e61", "13887490621_p", "jd_4e0d529ba3c35", "jd_493918e314b50", "jd_71a220104187a", "jd_vVhhkdUpTkJQ", "gary388jingdong", "wdjQkAbFobMTyo", "cloud_kim", "jd_558ed75f52d39", "15555448319_p", "wdhxZuEvXhhvCf", "jd_72b940be8c0f4", "congcong炒葱葱", "jd_7eb0de64eb25a", "13209558123_p", "jd_53bf7cb6fb8e6", "jd_4fe620f72fa7c", "夏雨的爱情", "jd_47ba82eb392a5", "jd_LXnFHXoJwXkW", "62160785-578856", "醒醒该睡了", "jd_LOEWgvNwQIWD", "xiiirww", "pet_virtual_friend_特兰克斯", "pet_virtual_friend_Talon", "jd_4f7cd5b108733", "jd_NgNWXMVkJIvk", "jadonglin", "玩家卫弈", "liangxuejingdong", "jd_627171efb7c0a", "jd_53bc7a14f64d6", "15809290902_p", "jd_65a2ab73d9aa5", "jd_6edb943cacbfb", "jd_7f7eabc5caf7d", "jd_725e17effb6a9", "蔡辉煌", "voxb", "gdxx_hhw_m", "jd_78f0d6524a1dc", "jd_sDtnONLeHwfG", "xyyshy1983", "yinlang46", "ypqian", "15817094457_p", "fdxwb", "wuyaoxin2012", "明子溪", "henry1927_m", "chamy99", "jd_461e384274c34", "248358330-645106", "jd_4fd63de4a6033", "蜜糖向日葵", "wonghe", "36453197-121619", "琳琅满目cbb", "jd_5b7cc9e532426", "134795344-89911673", "15211488203_p", "jd_6f1f0722f8365", "jd_JmGCpqgpCtqG", "墨明棋妙陈", "pet_virtual_friend_1314爱澳", "1209815-33190621", "zhouhuayh", "jd_6d3cbb8b0751a", "jd_6e00e826f939b", "mztvip", "davidharry", "sara35424", "sun5025", "jd_62ce2385bb364", "352834026-406289", "pet_virtual_friend_丁座的真爱粉", "jd_582eecf8d27a9", "jd_49acdb02e8514", "13976911784_p", "jd_uGzohbhFpRuz", "wzywolfgang", "yjbonny", "沧海不轮回", "649297742_327799447", "倚兰椒", "琳琳8796", "snzh2013", "jd_73751adc04afd", "wdNnlMzPGJJKgqI", "yygt1158", "jd_53df36eb204a0", "花开花花落", "jd_611e082213c89", "jd_71e77d9235cf5", "jd_596fd9fea411f", "jd_7277d200aa1ac", "15230573701_p", "zb19881021", "692620136落", "168876810-159969", "zhushidan100", "上自习的猪", "15602231009_p", "jd_5213fd3fd5e09", "jd_6711f97ee4dfe", "44787591-640051", "MisterGlasses", "jd_7b22bbfe1e7e5", "138555963-81748582", "jd_QEVVkkDTQAlJ", "4932713-24535180", "jd_6dce98c07a644", "jd_DUtPtiiDamDr", "wangyneu", "wBm1TsDy3p_m", "jd_6acd3a6cc79cc","jd_444f5c020f31c","jd_71caf6b3ec4cb", "shin_dynasty", "carola82", "jd_AOhLSBLdSnux", "ningbormb"] +/** + * 生成随机数字 + * @param {number} min 最小值(包含) + * @param {number} max 最大值(不包含) + */ +function randomNumber(min = 0, max = 100) { + return Math.min(Math.floor(min + Math.random() * (max - min)), max); } -let friendPin = friendsArr[randomFriendPin(0, friendsArr.length - 1)] //强制为对方助力,可成为好友关系 -friendPin = encodeURI(friendPin); +let friendPin = encodeURI(friendsArr[randomNumber(0, friendsArr.length)]) //强制为对方助力,可成为好友关系 const timestamp = new Date().getTime() newUrl = url.replace(/friendPin=.*?$/i, "friendPin=" + friendPin).replace(/invitePin=.*?$/i, "invitePin=" + friendPin).replace(/inviteTimeStamp=.*?$/i, "inviteTimeStamp=" + timestamp + "&") console.log(newUrl) diff --git a/jd_joy_reward.js b/jd_joy_reward.js index f8337837..c39fe96b 100644 --- a/jd_joy_reward.js +++ b/jd_joy_reward.js @@ -9,12 +9,12 @@ // Quantumult X [task_local] #宠汪汪积分兑换奖品 -0 0-16/8 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js, tag=宠汪汪积分兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +0 0-16/8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js, tag=宠汪汪积分兑换奖品, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true // Loon [Script] -cron "0 0-16/8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品 +cron "0 0-16/8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品 // Surge -宠汪汪积分兑换奖品 = type=cron,cronexp="0 0-16/8 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js +宠汪汪积分兑换奖品 = type=cron,cronexp="0 0-16/8 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js */ const $ = new Env('宠汪汪积分兑换奖品'); let joyRewardName = 20;//是否兑换京豆,默认开启兑换功能,其中20为兑换20京豆,500为兑换500京豆,0为不兑换京豆.数量有限先到先得 @@ -62,7 +62,7 @@ const JD_API_HOST = 'https://jdjoy.jd.com'; } console.log(`本地时间与京东服务器时间差(毫秒):${await get_diff_time()}`); await joyReward(); - // $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@lxk0301`); + // $.msg($.name, '兑换脚本暂不能使用', `请停止使用,等待后期更新\n如果新版本兑换您有兑换机会,请抓包兑换\n再把抓包数据发送telegram用户@LXK9301`); } } })() diff --git a/jd_joy_run.js b/jd_joy_run.js index 6b3cbb95..696c6ff0 100644 --- a/jd_joy_run.js +++ b/jd_joy_run.js @@ -14,34 +14,34 @@ hostname = draw.jdfcloud.com Surge [Script] -宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js -宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js -宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js +宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js +宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js 圈X [task_local] # 宠汪汪邀请助力与赛跑助力 -15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +15 10 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true [rewrite_local] # 宠汪汪助力更新Token -^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= url script-response-body https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js # 宠汪汪助力获取Token -^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js +^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= url script-request-header https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js *****Loon**** [Script] -cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 -http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token -http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token +cron "15 10 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 +http-response ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token +http-request ^https:\/\/draw\.jdfcloud\.com(\/mirror)?\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token **/ const isRequest = typeof $request != "undefined" const $ = new Env('宠汪汪赛跑'); const JD_BASE_API = `https://draw.jdfcloud.com//pet`; //此处填入你需要助力好友的京东用户名 //下面给出好友邀请助力的示例填写规则 -let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd"]; +let invite_pins = ["jd_6cd93e613b0e5,被折叠的记忆33,jd_704a2e5e28a66,jd_45a6b5953b15b,zooooo58,jd_66f5cecc1efcd,jd_41345a6f96aa5"]; //下面给出好友赛跑助力的示例填写规则 -let run_pins = ["被折叠的记忆33,jd_6cd93e613b0e5,jd_45a6b5953b15b,jd_66f5cecc1efcd,jd_sIhNpDXJehOr,jd_704a2e5e28a66,zooooo58"]; +let run_pins = ["被折叠的记忆33,jd_6cd93e613b0e5,jd_66f5cecc1efcd,jd_sIhNpDXJehOr,jd_41345a6f96aa5,jd_704a2e5e28a66,zooooo58"]; // $.LKYLToken = '76fe7794c475c18711e3b47185f114b5' || $.getdata('jdJoyRunToken'); // $.LKYLToken = $.getdata('jdJoyRunToken'); const friendsArr = ["yhr_19820404", "13008094886_p", "13966269193_p", "jd_4e4d9825e5fb1", "jd_5ff306cf94512", "ququkoko", "jd_59a9823f35496", "529577509-275616", "18923155789_p", "jd_455da88071d1e", "dreamscometrue5120", "蒋周南19620607", "jd_620ceca400151", "杉雨2011", "MARYMY88", "13682627696_p", "jd_6777ee65f9fcc", "夏海东12315", "jd_437b4f3fa5d83", "zyjyc9998", "meoygua", "MLHK7288", "jd_42d9ce3001acd", "jd_57650a30ef6eb", "jd_44ca1016e0f96", "jd_74332d1d62a97", "jd_7dbe4f8a40a7d", "jd_4fa238e4e3039", "elbereth1122", "jd_4d9be23908e41", "jd_51f0d43d78900", "13588108107_p", "123by456", "09niuniuma", "143798682-947527", "jd_560c6f30e6951", "jd_54ddb8af5374a", "夏革平", "247466310", "wang2011", "chensue", "1362245003-624122", "wdGefYCBlyOuvz", "jd_412f7eb363cd8", "18311575050_p", "1307976-34738981", "wdgOGLtOJjjbnp", "klhzdx", "jd_5fdcdcb183d7d", "jd_5862fd8834680", "jd_6cd93e613b0e5", "jd_51a64a9da6b94", "302990512-553401", "jd_4078f69a72873", "jd_ewYCRdmukzQH", "13348822441_p", "hlcx86021", "390823571-784974", "jd_79af2bc7a56a3", "15053231812_p", "jd_6f53253d117c5", "jd_5bf29dffa62ea", "jd_47a1c4ad02103", "刘凤苓", "145391572-102667", "yanglan0409", "jd_4b8a70f3b06c3", "弑神X", "jd_59d962a076126", "sjw3000", "jd_4d4def8b59787", "L1518235423", "jd_579b891fbea9b", "frank818", "hellohuhua", "jd_4cf1918577871", "jd_akYbyiXqrIDC", "李纪红", "jd_54a4260ca986c", "jd_4cba35cfa8220", "13654075776_p", "13916051043", "jd_6f9b9a6769afb", "iamkgbfox", "jd_5fbda9be54d5b", "jd_76763ba485c5e", "jd_45a6b5953b15b", "jd_485c757b79422", "xiaojingang_0", "lanye1545", "chenzhiyun2002", "lmpbjs1988", "jd_SmPxpudoGYOb", "jwl19690905", "荷舞弄清影88", "jd_750d6a9734717", "jd_64e37854e713f", "jd_573c9832d8989", "wdkplHVQlgowTW", "wwk232323", "jd_6bfe51f915c90", "我手机号码", "13681610268_p", "ss836580793", "15868005933_p", "zooooo58", "陌上花开花又落", "jd_701f52f8badbb", "jd_462f9229c20e4", "jd_42193689987a0", "jd_7dc5829121bcc", "13656692651_phz", "jd_47f49f22f1dc3", "handechun959", "13775208986_p", "guoyizhang", "jd_677dd20bf2749", "被折叠的记忆33", "jd_FfAnqFVEoBul", "jd_4e59841cae4f9", "jd_5279d593e7803", "思绪随风2011", "jd_62e335d785872", "suyugen", "jd_4e68b48d16f7b", "jd_56b7a4e092e85", "cocoty", "jd_7b6d6e7dc98f1", "jd_63423cd594e8b", "greatyunyun", "4349小丢丢", "18027486801_p", "15207695569_p", "llbai11", "wdNRUvbJItetlvB", "jd_54154982c707f", "85192cool", "jd_60d497271825b", "greatyunyun9320", "ky252571504", "jd_74e60dbcae365", "wdiicnSbYSHWwE", "jd_529a0a309d418", "jd_7be92b11b7e8f", "13486659225_p", "jd_iFnquhpWWAzO", "jd_6e348ece13e20", "jd_6f5b49bb757cb", "znz传奇", "418001066_m", "jd_67ded5748c3ab", "361372-27819972", "jd_5fafb631c98af", "jd_76dd04e844d63", "小鹿Jenny", "00数字方程式", "jd_77a82b603c6c3", "勇敢的小泪", "jd_4481f68984466", "jd_758f5224ee957", "mwb1992062_m", "15975229552_p", "zdj8341", "pet_virtual_friend_胡皋三", "pet_virtual_friend_绿茶sama", "pet_virtual_friend_Ainio", "jd_4915949b7bfa1", "jd_7ca74ed9224ef", "jd_42764f5ea2341", "5317123-63418293", "jd_40a2d9485cbdb", "qazmcl1230", "jd_7ced325aba4fd", "jd_402fe7425fcaf", "95581245-627991", "luffy-314_m", "jd_BCXgLlmxHdiS", "jd_610b3d00928e5", "你要醒来", "338379384-148135", "pet_virtual_friend_乔治桑", "jd_54130a3e282ea", "jd_6169b3411ed5b", "jd_428d930ca56a5", "qq6924309", "pet_virtual_friend_路遇狗与少年", "jd_712bd3bfd55d6", "jd_4e97fe5ca4003", "tommy_he1", "13981372001_p", "129867657-673064", "jd_525d6e7a57e7c", "wdZuirGekSHKmF", "jd_75e1da74980ab", "jd_RVMXldNSQNOP", "jd_5f94da0265e0d", "jd_67ab629be7e61", "13887490621_p", "jd_4e0d529ba3c35", "jd_493918e314b50", "jd_71a220104187a", "jd_vVhhkdUpTkJQ", "gary388jingdong", "wdjQkAbFobMTyo", "cloud_kim", "jd_558ed75f52d39", "15555448319_p", "wdhxZuEvXhhvCf", "jd_72b940be8c0f4", "congcong炒葱葱", "jd_7eb0de64eb25a", "13209558123_p", "jd_53bf7cb6fb8e6", "jd_4fe620f72fa7c", "夏雨的爱情", "jd_47ba82eb392a5", "jd_LXnFHXoJwXkW", "62160785-578856", "醒醒该睡了", "jd_LOEWgvNwQIWD", "xiiirww", "pet_virtual_friend_特兰克斯", "pet_virtual_friend_Talon", "jd_4f7cd5b108733", "jd_NgNWXMVkJIvk", "jadonglin", "玩家卫弈", "liangxuejingdong", "jd_627171efb7c0a", "jd_53bc7a14f64d6", "15809290902_p", "jd_65a2ab73d9aa5", "jd_6edb943cacbfb", "jd_7f7eabc5caf7d", "jd_725e17effb6a9", "蔡辉煌", "voxb", "gdxx_hhw_m", "jd_78f0d6524a1dc", "jd_sDtnONLeHwfG", "xyyshy1983", "yinlang46", "ypqian", "15817094457_p", "fdxwb", "wuyaoxin2012", "明子溪", "henry1927_m", "chamy99", "jd_461e384274c34", "248358330-645106", "jd_4fd63de4a6033", "蜜糖向日葵", "wonghe", "36453197-121619", "琳琅满目cbb", "jd_5b7cc9e532426", "134795344-89911673", "15211488203_p", "jd_6f1f0722f8365", "jd_JmGCpqgpCtqG", "墨明棋妙陈", "pet_virtual_friend_1314爱澳", "1209815-33190621", "zhouhuayh", "jd_6d3cbb8b0751a", "jd_6e00e826f939b", "jd_704a2e5e28a66", "mztvip", "davidharry", "sara35424", "sun5025", "jd_62ce2385bb364", "352834026-406289", "pet_virtual_friend_丁座的真爱粉", "jd_582eecf8d27a9", "jd_49acdb02e8514", "13976911784_p", "jd_uGzohbhFpRuz", "wzywolfgang", "yjbonny", "沧海不轮回", "649297742_327799447", "倚兰椒", "琳琳8796", "snzh2013", "jd_73751adc04afd", "wdNnlMzPGJJKgqI", "yygt1158", "jd_53df36eb204a0", "花开花花落", "jd_611e082213c89", "jd_71e77d9235cf5", "jd_596fd9fea411f", "jd_7277d200aa1ac", "15230573701_p", "zb19881021", "692620136落", "168876810-159969", "zhushidan100", "上自习的猪", "15602231009_p", "jd_5213fd3fd5e09", "jd_6711f97ee4dfe", "44787591-640051", "MisterGlasses", "jd_7b22bbfe1e7e5", "138555963-81748582", "jd_QEVVkkDTQAlJ", "4932713-24535180", "jd_6dce98c07a644", "jd_DUtPtiiDamDr", "wangyneu", "wBm1TsDy3p_m", "jd_6acd3a6cc79cc","jd_444f5c020f31c","jd_71caf6b3ec4cb", "shin_dynasty", "carola82", "jd_AOhLSBLdSnux", "ningbormb"]; @@ -124,7 +124,7 @@ async function getToken() { $.setdata(`${count}`, 'countFlag'); $.msg($.name, '更新Token: 成功🎉', ``); console.log(`开始上传Token`) - await $.http.get({url: `http://api.turinglabs.net/api/v1/jd/joy/create/${LKYLToken}/`}).then((resp) => { + await $.http.get({url: `http://jd.turinglabs.net/api/v2/jd/joy/create/${LKYLToken}/`}).then((resp) => { if (resp.statusCode === 200) { let { body } = resp; console.log(`Token提交结果:${body}`) @@ -160,7 +160,7 @@ async function getToken() { } function readToken() { return new Promise(resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/joy/read/1/`, 'timeout': 10000}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/joy/read/1/`, 'timeout': 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) diff --git a/jd_joy_steal.js b/jd_joy_steal.js index 46c985a1..63fec0f9 100644 --- a/jd_joy_steal.js +++ b/jd_joy_steal.js @@ -3,24 +3,24 @@ jd宠汪汪偷好友积分与狗粮,及给好友喂食 偷好友积分上限是20个好友(即获得100积分),帮好友喂食上限是20个好友(即获得200积分),偷好友狗粮上限也是20个好友(最多获得120g狗粮) IOS用户支持京东双账号,NodeJs用户支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js -更新时间:2020-11-03 +更新时间: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 */ // quantumultx // [task_local] // #宠汪汪偷好友积分与狗粮 -// 0 0,6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js, tag=宠汪汪偷好友积分与狗粮, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true +// 0 0,6 * * * 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,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 +// cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 // Surge -// 宠汪汪偷好友积分与狗粮 = type=cron,cronexp="0 0,6 * * *",wake-system=1,timeout=320,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js +// 宠汪汪偷好友积分与狗粮 = type=cron,cronexp="0 0,6 * * *",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; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; - +let nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000); //IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = ''; if ($.isNode()) { @@ -42,8 +42,25 @@ let message = '', subTitle = ''; let jdNotify = false;//是否开启静默运行,false关闭静默运行(即通知),true打开静默运行(即不通知) let jdJoyHelpFeed = false;//是否给好友喂食,false为不给喂食,true为给好友喂食,默认不给好友喂食 let jdJoyStealCoin = true;//是否偷好友积分与狗粮,false为否,true为是,默认是偷 -const weAppUrl = 'https://draw.jdfcloud.com//pet'; -const JD_API_HOST = 'https://jdjoy.jd.com/pet' +const JD_API_HOST = 'https://jdjoy.jd.com/pet'; +//是否给好友喂食 +let ctrTemp; +if ($.isNode() && process.env.JOY_HELP_FEED) { + ctrTemp = `${process.env.JOY_HELP_FEED}` === 'true'; +} else if ($.getdata('jdJoyHelpFeed')) { + ctrTemp = $.getdata('jdJoyHelpFeed') === 'true'; +} else { + ctrTemp = `${jdJoyHelpFeed}` === 'true'; +} +//是否偷好友狗粮 +let jdJoyStealCoinTemp; +if ($.isNode() && process.env.jdJoyStealCoin) { + jdJoyStealCoinTemp = `${process.env.jdJoyStealCoin}` === 'true'; +} else if ($.getdata('jdJoyStealCoin')) { + jdJoyStealCoinTemp = $.getdata('jdJoyStealCoin') === 'true'; +} else { + jdJoyStealCoinTemp = `${jdJoyStealCoin}` === 'true'; +} !(async () => { 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"}); @@ -80,92 +97,111 @@ const JD_API_HOST = 'https://jdjoy.jd.com/pet' $.done(); }) async function jdJoySteal() { - await getFriends(); - if ($.getFriendsData && $.getFriendsData.success) { + try { + $.helpFood = 0; + $.stealFriendCoin = 0; + $.stealFood = 0; message += `【京东账号${$.index}】${$.nickName}\n`; - await getCoinChanges(); - if ($.getFriendsData && $.getFriendsData.datas && $.getFriendsData.datas.length > 0) { - const { lastPage } = $.getFriendsData.page; - console.log('lastPage', lastPage) - $.allFriends = []; - for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { - console.log(`开始查询第${i}页好友\n`); - await getFriends(i); - $.allFriends = $.allFriends.concat($.getFriendsData.datas); - } - for (let index = 0; index < $.allFriends.length; index ++) { - //剔除自己 - if (!$.allFriends[index].stealStatus) { - $.allFriends.splice(index, 1); + await getFriends();//查询是否有好友 + await getCoinChanges();//查询喂食好友和偷好友积分是否已达上限 + if ($.getFriendsData && $.getFriendsData.success) { + if ($.getFriendsData && $.getFriendsData.datas && $.getFriendsData.datas.length > 0) { + const { lastPage } = $.getFriendsData.page; + // console.log('lastPage', lastPage) + console.log(`\n共 ${lastPage * 20 - 1} 个好友\n`); + $.allFriends = []; + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.visit_friend >= 100 || $.stealFriendCoin * 1 >= 100) { + console.log('偷好友积分已达上限(已获得100积分) 跳出\n') + $.stealFriendCoin = `已达上限(已获得100积分)`; + break + } + console.log(`偷好友积分 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + await stealFriendCoinFun(); + } + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.stealStatus === 'chance_full') { + console.log('偷好友狗粮已达上限 跳出\n') + if (!$.stealFood) { + $.stealFood = `已达上限`; + } + break + } + if (nowTimes.getHours() < 6) { + $.log('偷好友狗粮 未到6点时间') + break + } + console.log(`偷好友狗粮 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + await stealFriendsFood(); + } + for (let i = 1; i <= new Array(lastPage).fill('').length; i++) { + if ($.help_feed >= 200 || ($.helpFeedStatus && $.helpFeedStatus === 'chance_full')) { + console.log('帮好友喂食已达上限(已帮喂20个好友获得200积分) 跳出\n'); + $.helpFood = '已达上限(已帮喂20个好友获得200积分)' + break + } + if ($.helpFeedStatus && $.helpFeedStatus === 'food_insufficient') { + console.log('帮好友喂食失败,狗粮不足10g 跳出\n'); + break + } + if (!ctrTemp) { + console.log('您已设置不为好友喂食,现在跳过喂食,如需为好友喂食请在BoxJs打开喂食开关或者更改脚本 jdJoyHelpFeed 处'); + break + } + console.log(`帮好友喂食 开始查询第${i}页好友\n`); + await getFriends(i); + $.allFriends = $.getFriendsData.datas; + await helpFriendsFeed(); } } - console.log(`共${$.allFriends.length}个好友`); - $.helpFood = 0; - $.stealFriendCoin = 0; - $.stealFood = 0; - await Promise.all([ - stealFriendCoinFun(),//偷积分 - stealFriendsFood(),//偷好友狗粮 - helpFriendsFeed()//给好友喂食 - ]) + } else { + message += `${$.getFriendsData && $.getFriendsData.errorMessage}\n`; } - } else { - message += `${$.getFriendsData && $.getFriendsData.errorMessage}\n`; + } catch (e) { + $.logErr(e) } } async function stealFriendsFood() { - let jdJoyStealCoinTemp; - if ($.isNode() && process.env.jdJoyStealCoin) { - jdJoyStealCoinTemp = `${process.env.jdJoyStealCoin}` === 'true'; - } else if ($.getdata('jdJoyStealCoin')) { - jdJoyStealCoinTemp = $.getdata('jdJoyStealCoin') === 'true'; - } else { - jdJoyStealCoinTemp = `${jdJoyStealCoin}` === 'true'; - } - if (jdJoyStealCoinTemp) { - console.log(`开始偷好友狗粮`); - for (let friends of $.allFriends) { - const { friendPin, status, stealStatus } = friends; - console.log(`stealFriendsFood---好友【${friendPin}】--偷食状态:${stealStatus}\n`); - // console.log(`stealFriendsFood---好友【${friendPin}】--喂食状态:${status}\n`); - if (stealStatus === 'can_steal') { - //可偷狗粮 - //偷好友狗粮 - console.log(`发现好友【${friendPin}】可偷狗粮\n`) - await enterFriendRoom(friendPin); - await doubleRandomFood(friendPin); - const getRandomFoodRes = await getRandomFood(friendPin); - console.log(`偷好友狗粮结果:${JSON.stringify(getRandomFoodRes)}`) - if (getRandomFoodRes && getRandomFoodRes.success) { - if (getRandomFoodRes.errorCode === 'steal_ok') { - $.stealFood += getRandomFoodRes.data; - } else if (getRandomFoodRes.errorCode === 'chance_full') { - console.log('偷好友狗粮已达上限,跳出循环'); - break; - } + console.log(`开始偷好友狗粮`); + for (let friends of $.allFriends) { + const { friendPin, status, stealStatus } = friends; + $.stealStatus = stealStatus; + console.log(`stealFriendsFood---好友【${friendPin}】--偷食状态:${stealStatus}\n`); + // console.log(`stealFriendsFood---好友【${friendPin}】--喂食状态:${status}\n`); + if (stealStatus === 'can_steal') { + //可偷狗粮 + //偷好友狗粮 + console.log(`发现好友【${friendPin}】可偷狗粮\n`) + await enterFriendRoom(friendPin); + await doubleRandomFood(friendPin); + const getRandomFoodRes = await getRandomFood(friendPin); + console.log(`偷好友狗粮结果:${JSON.stringify(getRandomFoodRes)}`) + if (getRandomFoodRes && getRandomFoodRes.success) { + if (getRandomFoodRes.errorCode === 'steal_ok') { + $.stealFood += getRandomFoodRes.data; + } else if (getRandomFoodRes.errorCode === 'chance_full') { + console.log('偷好友狗粮已达上限,跳出循环'); + break; } - } else if (stealStatus === 'chance_full') { - console.log('偷好友狗粮已达上限,跳出循环'); - break; } + } else if (stealStatus === 'chance_full') { + console.log('偷好友狗粮已达上限,跳出循环'); + break; } } } //偷好友积分 async function stealFriendCoinFun() { - let jdJoyStealCoinTemp; - if ($.isNode() && process.env.jdJoyStealCoin) { - jdJoyStealCoinTemp = `${process.env.jdJoyStealCoin}` === 'true'; - } else if ($.getdata('jdJoyStealCoin')) { - jdJoyStealCoinTemp = $.getdata('jdJoyStealCoin') === 'true'; - } else { - jdJoyStealCoinTemp = `${jdJoyStealCoin}` === 'true'; - } if (jdJoyStealCoinTemp) { if ($.visit_friend !== 100) { console.log('开始偷好友积分') for (let friends of $.allFriends) { const { friendPin } = friends; + if (friendPin === $.UserName) continue await stealFriendCoin(friendPin);//领好友积分 if ($.stealFriendCoin * 1 === 100) { console.log(`偷好友积分已达上限${$.stealFriendCoin}个,现跳出循环`) @@ -181,24 +217,15 @@ async function stealFriendCoinFun() { //给好友喂食 async function helpFriendsFeed() { if ($.help_feed !== 200) { - //可给好友喂食 - let ctrTemp; - if ($.isNode() && process.env.JOY_HELP_FEED) { - ctrTemp = `${process.env.JOY_HELP_FEED}` === 'true'; - } else if ($.getdata('jdJoyHelpFeed')) { - ctrTemp = $.getdata('jdJoyHelpFeed') === 'true'; - } else { - ctrTemp = `${jdJoyHelpFeed}` === 'true'; - } if (ctrTemp) { console.log(`\n开始给好友喂食`); for (let friends of $.allFriends) { const { friendPin, status, stealStatus } = friends; - // console.log(`\nhelpFriendsFeed---好友【${friendPin}】--偷食状态:${stealStatus}`); console.log(`\nhelpFriendsFeed---好友【${friendPin}】--喂食状态:${status}`); if (status === 'not_feed') { const helpFeedRes = await helpFeed(friendPin); // console.log(`帮忙喂食结果--${JSON.stringify(helpFeedRes)}`) + $.helpFeedStatus = helpFeedRes.errorCode; if (helpFeedRes && helpFeedRes.errorCode === 'help_ok' && helpFeedRes.success) { console.log(`帮好友[${friendPin}]喂食10g狗粮成功,你获得10积分\n`); $.helpFood += 10; diff --git a/jd_jxnc.js b/jd_jxnc.js index 164b1230..e6c83d45 100644 --- a/jd_jxnc.js +++ b/jd_jxnc.js @@ -3,7 +3,7 @@ 本脚本搬运自 https://github.com/whyour/hundun/blob/master/quanx/jx_nc.js 感谢 @whyour 大佬 -京喜农场:脚本更新地址 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js +京喜农场:脚本更新地址 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js 更新时间:2021-01-10 22:47:51 东东农场活动链接:https://wqsh.jd.com/sns/201912/12/jxnc/detail.html?ptag=7155.9.32&smp=b47f4790d7b2a024e75279f55f6249b9&active=jdnc_1_chelizi1205_2 已支持IOS双京东账号,Node.js支持N个京东账号 @@ -14,20 +14,20 @@ hostname = wq.jd.com ==========================Quantumultx========================= [task_local] -0 9,12,18 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, tag=京喜农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxnc.png, enabled=true +0 9,12,18 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js, tag=京喜农场, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jxnc.png, enabled=true [rewrite_local] ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask url script-request-header https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js =========================Loon============================= [Script] http-request ^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js, requires-body=false, timeout=10, tag=京喜农场cookie -cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js,tag=京喜农场 +cron "0 9,12,18 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js,tag=京喜农场 =========================Surge============================ -京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=60,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js +京喜农场 = type=cron,cronexp="0 9,12,18 * * *",timeout=60,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js 京喜农场cookie = type=http-request,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,requires-body=0,max-size=0,script-path= https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js =========================小火箭=========================== -京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true +京喜农场 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jxnc.js, cronexpr="0 9,12,18 * * *", timeout=200, enable=true 京喜农场APP种子cookie = type=http-request,script-path=https://raw.githubusercontent.com/whyour/hundun/master/quanx/jx_nc.cookie.js,pattern=^https\:\/\/wq\.jd\.com\/cubeactive\/farm\/dotask,max-size=131072,timeout=110,enable=true 特别说明: @@ -77,7 +77,7 @@ let assistUserShareCode = 0; // 随机助力用户 share code $.index = i + 1; $.isLogin = true; $.nickName = ''; - $.log(`检查【京东账号${$.index}】${$.UserName} cookie 是否有效`); + $.log(`\n************* 检查【京东账号${$.index}】${$.UserName} cookie 是否有效 *************`); await TotalBean(); $.log(`开始【京东账号${$.index}】${$.nickName || $.UserName}\n`); if (!$.isLogin) { @@ -93,6 +93,7 @@ let assistUserShareCode = 0; // 随机助力用户 share code $.answer = 0; $.helpNum = 0; $.helpSelfNum = 0; + notifyBool = notifyLevel > 0; // 初始化是否推送 await tokenFormat(); // 处理当前账号 token await shareCodesFormat(); // 处理当前账号 助力码 await jdJXNC(); // 执行当前账号 主代码流程 @@ -112,7 +113,6 @@ function requireConfig() { return new Promise(resolve => { $.log('开始获取配置文件\n') notify = $.isNode() ? require('./sendNotify') : ''; - notifyBool = notifyLevel > 0; // 初始化是否推送 //Node.js用户请在jdCookie.js处填写京东ck; const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; const jdTokenNode = $.isNode() ? require('./jdJxncTokens.js') : ''; @@ -426,14 +426,15 @@ function submitInviteId(userName) { message += '【邀请码】提交成功!\n'; } } catch (e) { - $.logErr(e, resp); + // $.logErr(e, resp); + $.log('邀请码提交失败 API 返回异常'); } finally { resolve(); } }, ); } catch (e) { - $.logErr(e, resp); + // $.logErr(e, resp); resolve(); } }); @@ -452,13 +453,14 @@ function getAssistUser() { $.log(`获取随机助力码失败 ${code}`); } } catch (e) { - $.logErr(e, resp); + // $.logErr(e, resp); + $.log('获取随机助力码失败 API 返回异常'); } finally { resolve(false); } }); } catch (e) { - $.logErr(e, resp); + // $.logErr(e, resp); resolve(false); } }); @@ -573,6 +575,8 @@ async function showMsg() { if ($.isNode()) { await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`); } + } else { + $.log(`${$.name} - notify 通知已关闭\n账号${$.index} - ${$.nickName}\n${subTitle}\n${message}`); } } diff --git a/jd_kd.js b/jd_kd.js index 3037e164..ba4cb9f7 100644 --- a/jd_kd.js +++ b/jd_kd.js @@ -2,24 +2,24 @@ 京东快递签到 活动地址:https://jingcai-h5.jd.com/#/ 签到领豆,14天内满4次和7次享额外奖励,每天运行一次即可 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #京东快递签到 -10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png, enabled=true +10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, tag=京东快递签到, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_kd.png, enabled=true ================Loon============== [Script] -cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到 +cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, tag=京东快递签到 ===============Surge================= -京东快递签到 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js +京东快递签到 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js ============小火箭========= -京东快递签到 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, cronexpr="10 0 * * *", timeout=200, enable=true +京东快递签到 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_kd.js, cronexpr="10 0 * * *", timeout=200, enable=true */ const $ = new Env('京东快递签到'); diff --git a/jd_live.js b/jd_live.js index 5280236a..89f3fef5 100644 --- a/jd_live.js +++ b/jd_live.js @@ -7,17 +7,17 @@ ============Quantumultx=============== [task_local] #京东直播 -10-20/5 12 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播, enabled=true +10-20/5 12 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js, tag=京东直播, enabled=true ================Loon============== [Script] -cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js,tag=京东直播 +cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js,tag=京东直播 ===============Surge================= -京东直播 = type=cron,cronexp="10-20/5 12 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js +京东直播 = type=cron,cronexp="10-20/5 12 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js ============小火箭========= -京东直播 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, cronexpr="10-20/5 12 * * *", timeout=200, enable=true +京东直播 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_live.js, cronexpr="10-20/5 12 * * *", timeout=200, enable=true */ const $ = new Env('京东直播'); diff --git a/jd_moneyTree.js b/jd_moneyTree.js index 779bc789..03bdcf37 100644 --- a/jd_moneyTree.js +++ b/jd_moneyTree.js @@ -1,5 +1,5 @@ /* -京东摇钱树 :https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js +京东摇钱树 :https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js 更新时间:2020-11-16 京东摇钱树支持京东双账号 注:如果使用Node.js, 需自行安装'crypto-js,got,http-server,tough-cookie'模块. 例: npm install crypto-js http-server tough-cookie got --save @@ -7,12 +7,12 @@ // quantumultx // [task_local] // #京东摇钱树 -// 3 */2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js, tag=京东摇钱树, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png, enabled=true +// 3 */2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js, tag=京东摇钱树, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png, enabled=true // Loon // [Script] -// cron "3 */2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js,tag=京东摇钱树 +// cron "3 */2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js,tag=京东摇钱树 // Surge -//京东摇钱树 = type=cron,cronexp="3 */2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js +//京东摇钱树 = type=cron,cronexp="3 */2 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js const $ = new Env('京东摇钱树'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/jd_necklace.js b/jd_necklace.js index 038a0fa0..5735f1ec 100644 --- a/jd_necklace.js +++ b/jd_necklace.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-20 11:42:03 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-12-12 12:27:14 */ /* @@ -13,17 +13,17 @@ APP活动入口:“最新版本京东APP >领券中心/券后9.9>领点点券 ===============Quantumultx=============== [task_local] #点点券 -10 0,20 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, tag=点点券, enabled=true +10 0,20 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js, tag=点点券, enabled=true ================Loon============== [Script] -cron "10 0,20 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js,tag=点点券 +cron "10 0,20 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js,tag=点点券 ===============Surge================= -点点券 = type=cron,cronexp="10 0,20 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js +点点券 = type=cron,cronexp="10 0,20 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js ============小火箭========= -点点券 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, cronexpr="10 0,20 * * *", timeout=200, enable=true +点点券 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_necklace.js, cronexpr="10 0,20 * * *", timeout=200, enable=true */ const $ = new Env('点点券'); diff --git a/jd_nh.js b/jd_nh.js index 6e8859e5..39118094 100644 --- a/jd_nh.js +++ b/jd_nh.js @@ -13,17 +13,17 @@ ============Quantumultx=============== [task_local] #京东年货节 -1 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_nh.js, tag=京东年货节, enabled=true +1 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js, tag=京东年货节, enabled=true ================Loon============== [Script] -cron "1 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_nh.js,tag=京东年货节 +cron "1 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js,tag=京东年货节 ===============Surge================= -京东年货节 = type=cron,cronexp="1 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_nh.js +京东年货节 = type=cron,cronexp="1 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js ============小火箭========= -京东年货节 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_nh.js, cronexpr="1 7 * * *", timeout=200, enable=true +京东年货节 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nh.js, cronexpr="1 7 * * *", timeout=200, enable=true */ const $ = new Env('京东年货节'); diff --git a/jd_nian.js b/jd_nian.js new file mode 100644 index 00000000..b27f6da5 --- /dev/null +++ b/jd_nian.js @@ -0,0 +1,624 @@ +/* +京东炸年兽🧨 +活动地址:京东app左侧浮动窗口 +已支持IOS双京东账号,Node.js支持N个京东账号 +脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js +============Quantumultx=============== +[task_local] +#京东炸年兽🧨 +0 8 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, tag=京东炸年兽🧨, enabled=true + +================Loon============== +[Script] +cron "0 8 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js,tag=京东炸年兽🧨 + +===============Surge================= +京东炸年兽🧨 = type=cron,cronexp="0 8 * * *",wake-system=1,timeout=200,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js + +============小火箭========= +京东炸年兽🧨 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nian.js, cronexpr="0 8 * * *", timeout=200, enable=true + */ +const $ = new Env('京东炸年兽🧨'); + +const notify = $.isNode() ? require('./sendNotify') : ''; +//Node.js用户请在jdCookie.js处填写京东ck; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; +let jdNotify = true;//是否关闭通知,false打开通知推送,true关闭通知推送 +const randomCount = $.isNode() ? 20 : 5; +//IOS等用户直接用NobyDa的jd cookie +let cookiesArr = [], cookie = '', message; +if ($.isNode()) { + Object.keys(jdCookieNode).forEach((item) => { + cookiesArr.push(jdCookieNode[item]) + }) + if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; +} else { + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); +} +const JD_API_HOST = 'https://api.m.jd.com/client.action'; +const inviteCodes = [ + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0`, + `cgxZaDXWZPCmiUa2akPVmFMI27K6antJzucULQPYNim_BPEW1Dwd@cgxZdTXtIrPYuAqfDgSpusxr97nagU6hwFa3TXxnqM95u3ib-xt4nWqZdz8@cgxZdTXtIO-O6QmYDVf67KCEJ19JcybuMB2_hYu8NSNQg0oS2Z_FpMce45g@cgxZdTXtILiLvg7OAASp61meehou4OeZvqbjghsZlc3rI5SBk7b3InUqSQ0` +]; +!(async () => { + await requireConfig(); + 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; + } + for (let i = 0; i < cookiesArr.length; i++) { + if (cookiesArr[i]) { + cookie = cookiesArr[i]; + $.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1]) + $.index = i + 1; + $.isLogin = true; + $.nickName = ''; + message = ''; + await TotalBean(); + console.log(`\n******开始【京东账号${$.index}】${$.nickName || $.UserName}*********\n`); + if (!$.isLogin) { + $.msg($.name, `【提示】cookie已失效`, `京东账号${$.index} ${$.nickName || $.UserName}\n请重新登录获取\nhttps://bean.m.jd.com/bean/signIndex.action`, {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); + + if ($.isNode()) { + await notify.sendNotify(`${$.name}cookie已失效 - ${$.UserName}`, `京东账号${$.index} ${$.UserName}\n请重新登录获取cookie`); + } + continue + } + await shareCodesFormat(); + await jdNian() + } + } +})() + .catch((e) => { + $.log('', `❌ ${$.name}, 失败! 原因: ${e}!`, '') + }) + .finally(() => { + $.done(); + }) +async function jdNian() { + await getHomeData() + if(!$.secretp) return + await getTaskList() + await $.wait(1000) + await doTask() + await helpFriends() + await getHomeData(true) + await showMsg() +} +function encode(data, aa, extraData) { + const temp = { + "extraData": JSON.stringify(extraData), + "businessData": JSON.stringify(data), + "secretp": aa, + } + return { "ss": (JSON.stringify(temp)) }; +} +function getRnd() { + return Math.floor(1e6 * Math.random()).toString(); +} +function showMsg() { + return new Promise(resolve => { + if (!jdNotify) { + $.msg($.name, '', `${message}`); + } else { + $.log(`京东账号${$.index}${$.nickName}\n${message}`); + } + if (new Date().getHours() === 23) { + $.msg($.name, '', `京东账号${$.index}${$.nickName}\n${message}`); + } + resolve() + }) +} +async function helpFriends() { + for (let code of $.newShareCodes) { + if (!code) continue + await getFriendData(code) + await $.wait(1000) + } +} +async function doTask() { + for (let item of $.taskVos) { + if (item.taskType === 14) { + //好友助力任务 + //console.log(`您的好友助力码为${item.assistTaskDetailVo.taskToken}`) + } + if(item.taskType===2){ + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + await getFeedDetail({"taskId":item.taskId},item.taskId) + } else if(item.status===2){ + console.log(`${item.taskName}已做完`) + } + } + else if (item.taskType === 3 || item.taskType === 26) { + if(item.shoppingActivityVos) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId); + } + } + } else if (item.status === 2) { + console.log(`${item.taskName}已做完`) + } + } + } + else if (item.taskType === 9) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.shoppingActivityVos) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId, 1); + } + } + } else if(item.status===2){ + console.log(`${item.taskName}已做完`) + } + } + else if (item.taskType === 7) { + if (item.status === 1) { + console.log(`准备做此任务:${item.taskName}`) + for (let task of item.browseShopVo) { + if (task.status === 1) { + await collectScore(item.taskId, task.itemId, 1); + } + } + } else if(item.status===2){ + console.log(`${item.taskName}已做完`) + } + } + } +} + +function getFeedDetail(body={}) { + return new Promise(resolve => { + $.post(taskPostUrl("nian_getFeedDetail", body, "nian_getFeedDetail"), 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.data.bizCode === 0) { + if(data.data.result.addProductVos){ + for(let vo of data.data.result.addProductVos){ + if(vo['status']===1){ + for(let i=0;i { + $.post(taskPostUrl('nian_getHomeData'), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.userInfo = data.data.result.homeMainInfo + $.secretp = $.userInfo.secretp; + if(!$.secretp){ + console.log(`账号被风控`) + message += `账号被风控,无法参与活动\n` + $.secretp = null + return + } + console.log(`当前爆竹${$.userInfo.raiseInfo.remainScore}🧨,下一关需要${$.userInfo.raiseInfo.nextLevelScore}🧨`) + + if(info) { + message += `当前爆竹${$.userInfo.raiseInfo.remainScore}🧨\n` + return + } + if($.userInfo.raiseInfo.produceScore > 0){ + console.log(`可收取的爆竹大于0,去收取爆竹`) + await collectProduceScore() + } + if(parseInt($.userInfo.raiseInfo.remainScore) >= parseInt($.userInfo.raiseInfo.curLevelStartScore)){ + console.log(`去升级`) + await $.wait(2000) + await raise() + } + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function collectProduceScore(taskId= "collectProducedCoin") { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + const body = encode(temp, $.secretp, extraData); + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectProduceScore", body, "nian_collectProduceScore"), 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.data.bizCode === 0) { + console.log(`收取成功,获得${data.data.result.produceScore}爆竹🧨`) + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function collectScore(taskId,itemId,actionType,inviteId) { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + if(itemId) temp['itemId'] = itemId + if(actionType) temp['actionType'] = actionType + if(inviteId) temp['inviteId'] = inviteId + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + let body = { + ...encode(temp, $.secretp, extraData), + taskId:taskId, + itemId:itemId + } + if(actionType) body['actionType'] = actionType + if(inviteId) body['inviteId'] = inviteId + return new Promise(resolve => { + $.post(taskPostUrl("nian_collectScore", body, "nian_collectScore"), 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.data.bizCode === 0) { + if(data.data.result.score) + console.log(`任务完成,获得${data.data.result.score}爆竹`) + else if(data.data.result.maxAssistTimes) { + console.log(`助力好友成功`) + } else{ + console.log(`任务上报成功`) + await $.wait(10*1000) + if(data.data.result.taskToken){ + await doTask2(data.data.result.taskToken) + } + } + // $.userInfo = data.data.result.userInfo; + } + else{ + console.log(data.data.bizMsg) + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function doTask2(taskToken) { + let body = { + "dataSource":"newshortAward", + "method":"getTaskAward", + "reqParams":`{\"taskToken\":\"${taskToken}\"}` + } + return new Promise(resolve => { + $.post(taskPostUrl("qryViewkitCallbackResult", body, ), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (safeGet(data)) { + data = JSON.parse(data); + // console.log(data) + if (data.code === "0") { + console.log(data.toast.subTitle + '🧨') + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function raise(taskId= "nian_raise") { + let temp = { + "taskId": taskId, + "rnd": getRnd(), + "inviteId": "-1", + "stealId": "-1" + } + const extraData = { + "jj": 6, + "buttonid": "jmdd-react-smash_0", + "sceneid": "homePageh5", + "appid": '50073' + } + const body = encode(temp, $.secretp, extraData); + return new Promise(resolve => { + $.post(taskPostUrl("nian_raise", body, "nian_raise"), 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.data.bizCode === 0) { + console.log(`升级成功`) + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getTaskList(body={}) { + return new Promise(resolve => { + $.post(taskPostUrl("nian_getTaskDetail", body, "nian_getTaskDetail"), 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.data.bizCode === 0) { + if(JSON.stringify(body)==="{}") { + $.taskVos = data.data.result.taskVos;//任务列表 + console.log(`您的好友助力码为${data.data.result.inviteId}`) + } + // $.userInfo = data.data.result.userInfo; + } + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function getFriendData(inviteId) { + return new Promise((resolve) => { + $.post(taskPostUrl('nian_getHomeData',{"inviteId":inviteId}), async (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + data = JSON.parse(data); + if (data && data.data['bizCode'] === 0) { + $.itemId = data.data.result.homeMainInfo.guestInfo.itemId + await collectScore('2',$.itemId,null,inviteId) + } + } + } catch (e) { + $.logErr(e, resp); + } finally { + resolve(); + } + }) + }) +} +function readShareCode() { + console.log(`开始`) + return new Promise(async resolve => { + $.get({url: `http://api.turinglabs.net/api/v1/jd/nian/read/${randomCount}/`}, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + console.log(`随机取${randomCount}个码放到您固定的互助码后面(不影响已有固定互助)`) + data = JSON.parse(data); + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(data); + } + }) + // await $.wait(2000); + // resolve() + }) +} +//格式化助力码 +function shareCodesFormat() { + return new Promise(async resolve => { + // console.log(`第${$.index}个京东账号的助力码:::${$.shareCodesArr[$.index - 1]}`) + $.newShareCodes = []; + if ($.shareCodesArr[$.index - 1]) { + $.newShareCodes = $.shareCodesArr[$.index - 1].split('@'); + } else { + console.log(`由于您第${$.index}个京东账号未提供shareCode,将采纳本脚本自带的助力码\n`) + const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1); + $.newShareCodes = inviteCodes[tempIndex].split('@'); + } + const readShareCodeRes = null //await readShareCode(); + if (readShareCodeRes && readShareCodeRes.code === 200) { + $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])]; + } + console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`) + resolve(); + }) +} +function requireConfig() { + return new Promise(resolve => { + console.log(`开始获取${$.name}配置文件\n`); + //Node.js用户请在jdCookie.js处填写京东ck; + const shareCodes = [] + console.log(`共${cookiesArr.length}个京东账号\n`); + $.shareCodesArr = []; + if ($.isNode()) { + Object.keys(shareCodes).forEach((item) => { + if (shareCodes[item]) { + $.shareCodesArr.push(shareCodes[item]) + } + }) + } + console.log(`您提供了${$.shareCodesArr.length}个账号的${$.name}助力码\n`); + resolve() + }) +} + +function taskPostUrl(function_id, body = {}, function_id2) { + let url = `${JD_API_HOST}`; + if (function_id2) { + url += `?functionId=${function_id2}`; + } + return { + url, + body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`, + headers: { + "Cookie": cookie, + "origin": "https://h5.m.jd.com", + "referer": "https://h5.m.jd.com/", + 'Content-Type': 'application/x-www-form-urlencoded', + "User-Agent": "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0", + } + } +} +function TotalBean() { + return new Promise(async resolve => { + const options = { + "url": `https://wq.jd.com/user/info/QueryJDUserInfo?sceneval=2`, + "headers": { + "Accept": "application/json,text/plain, */*", + "Content-Type": "application/x-www-form-urlencoded", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh-cn", + "Connection": "keep-alive", + "Cookie": cookie, + "Referer": "https://wqs.jd.com/my/jingdou/my.shtml?sceneval=2", + "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") + } + } + $.post(options, (err, resp, data) => { + try { + if (err) { + console.log(`${JSON.stringify(err)}`) + console.log(`${$.name} API请求失败,请检查网路重试`) + } else { + if (data) { + data = JSON.parse(data); + if (data['retcode'] === 13) { + $.isLogin = false; //cookie过期 + return + } + $.nickName = data['base'].nickname; + } else { + console.log(`京东服务器返回空数据`) + } + } + } catch (e) { + $.logErr(e, resp) + } finally { + resolve(); + } + }) + }) +} +function safeGet(data) { + try { + if (typeof JSON.parse(data) == "object") { + return true; + } + } catch (e) { + console.log(e); + console.log(`京东服务器访问数据为空,请检查自身设备网络情况`); + return false; + } +} +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} +// prettier-ignore +function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,r)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.isNeedRewrite=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let r=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");r=r?1*r:20,r=e&&e.timeout?e.timeout:r;const[o,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:r},headers:{"X-Key":o,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),r=JSON.stringify(this.data);s?this.fs.writeFileSync(t,r):i?this.fs.writeFileSync(e,r):this.fs.writeFileSync(t,r)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let r=t;for(const t of i)if(r=Object(r)[t],void 0===r)return s;return r}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),r=s?this.getval(s):"";if(r)try{const t=JSON.parse(r);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,r]=/^@(.*?)\.(.*?)$/.exec(e),o=this.getval(i),h=i?"null"===o?null:o||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,r,t),s=this.setval(JSON.stringify(e),i)}catch(e){const o={};this.lodash_set(o,r,t),s=this.setval(JSON.stringify(o),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?(this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)})):this.isQuanX()?(this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t))):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{if(t.headers["set-cookie"]){const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)}))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())this.isSurge()&&this.isNeedRewrite&&(t.headers=t.headers||{},Object.assign(t.headers,{"X-Surge-Skip-Scripting":!1})),$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",this.isNeedRewrite&&(t.opts=t.opts||{},Object.assign(t.opts,{hints:!1})),$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:r,body:o}=t;e(null,{status:s,statusCode:i,headers:r,body:o},o)},t=>{const{message:s,response:i}=t;e(s,i,i&&i.body)})}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",r){const o=t=>{if(!t)return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:this.isSurge()?{url:t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t.url||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.url||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}if(this.isSurge()){let e=t.url||t.openUrl||t["open-url"];return{url:e}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,o(r)):this.isQuanX()&&$notify(e,s,i,o(r)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/activity/jd_collectProduceScore.js b/jd_nianCollect.js similarity index 89% rename from activity/jd_collectProduceScore.js rename to jd_nianCollect.js index dfda239d..da35d1de 100644 --- a/activity/jd_collectProduceScore.js +++ b/jd_nianCollect.js @@ -1,13 +1,13 @@ /* -京东全民营业领金币 -仅仅是收集一下京东双十一全名营业每秒产生的金币 +京东炸年兽领爆竹🧨 +仅仅是收集一下京东炸年兽领爆竹活动每秒产生的爆竹🧨 每小时的第20分运行一次 -20 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_collectProduceScore.js +20 * * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_nianCollect.js */ -const $ = new Env('京东全民营业领金币'); +const $ = new Env('京东炸年兽领爆竹🧨'); //Node.js用户请在jdCookie.js处填写京东ck; -const jdCookieNode = $.isNode() ? require('../jdCookie.js') : ''; +const jdCookieNode = $.isNode() ? require('./jdCookie.js') : ''; //IOS等用户直接用NobyDa的jd cookie let cookiesArr = [], cookie = ''; @@ -18,8 +18,13 @@ if ($.isNode()) { if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => { }; } else { - cookiesArr.push($.getdata('CookieJD')); - cookiesArr.push($.getdata('CookieJD2')); + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); } let UserName = ''; const JD_API_HOST = `https://api.m.jd.com/client.action`; @@ -28,7 +33,7 @@ const JD_API_HOST = `https://api.m.jd.com/client.action`; $.msg($.name, '【提示】请先获取cookie\n直接使用NobyDa的京东签到获取', 'https://bean.m.jd.com/bean/signIndex.action', {"open-url": "https://bean.m.jd.com/bean/signIndex.action"}); return; } - console.log(`\n小功能::仅仅是收集一下京东双十一全名营业每秒产生的金币,建议一个小时跑一次脚本\n`) + console.log(`\n小功能::仅仅是收集一下京东炸年兽领金币每秒产生的爆竹🧨,建议一个小时跑一次脚本\n`) for (let i = 0; i < cookiesArr.length; i++) { cookie = cookiesArr[i]; if (cookie) { @@ -62,7 +67,7 @@ async function collectProduceScore() { } function stall_collectProduceScore(body) { return new Promise((resolve) => { - $.post(taskPostUrl('stall_collectProduceScore', body), (err, resp, data) => { + $.post(taskPostUrl('nian_collectProduceScore', body), (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -71,9 +76,9 @@ function stall_collectProduceScore(body) { if (data) { data = JSON.parse(data); if (data && data.data.bizCode === 0) { - console.log(`京东账号${$.index} ${$.UserName}成功收集金币:${data.data.result.produceScore}个`) + console.log(`京东账号${$.index} ${$.UserName}成功收集爆竹🧨:${data.data.result.produceScore}个`) } else { - console.log(`京东账号${$.index} ${$.UserName}成功收集金币失败:${data.data.bizMsg}`) + console.log(`京东账号${$.index} ${$.UserName}成功收集爆竹🧨失败:${data.data.bizMsg}`) } } else { console.log(`请检查自身设备原因`); @@ -89,7 +94,7 @@ function stall_collectProduceScore(body) { } function getHomeData() { return new Promise((resolve) => { - $.post(taskPostUrl('stall_getHomeData'), (err, resp, data) => { + $.post(taskPostUrl('nian_getHomeData'), (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -133,4 +138,17 @@ function taskPostUrl(functionId, body = {}) { } } } + +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} + function Env(t, s) { return new class { constructor(t, s) { this.name = t, this.data = null, this.dataFile = "box.dat", this.logs = [], this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, s), this.log("", `\ud83d\udd14${this.name}, \u5f00\u59cb!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } getScript(t) { return new Promise(s => { $.get({ url: t }, (t, e, i) => s(i)) }) } runScript(t, s) { return new Promise(e => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let o = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); o = o ? 1 * o : 20, o = s && s.timeout ? s.timeout : o; const [h, a] = i.split("@"), r = { url: `http://${a}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: o }, headers: { "X-Key": h, Accept: "*/*" } }; $.post(r, (t, s, i) => e(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s); if (!e && !i) return {}; { const i = e ? t : s; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), s = this.path.resolve(process.cwd(), this.dataFile), e = this.fs.existsSync(t), i = !e && this.fs.existsSync(s), o = JSON.stringify(this.data); e ? this.fs.writeFileSync(t, o) : i ? this.fs.writeFileSync(s, o) : this.fs.writeFileSync(t, o) } } lodash_get(t, s, e) { const i = s.replace(/\[(\d+)\]/g, ".$1").split("."); let o = t; for (const t of i) if (o = Object(o)[t], void 0 === o) return e; return o } lodash_set(t, s, e) { return Object(t) !== t ? t : (Array.isArray(s) || (s = s.toString().match(/[^.[\]]+/g) || []), s.slice(0, -1).reduce((t, e, i) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(s[i + 1]) >> 0 == +s[i + 1] ? [] : {}, t)[s[s.length - 1]] = e, t) } getdata(t) { let s = this.getval(t); if (/^@/.test(t)) { const [, e, i] = /^@(.*?)\.(.*?)$/.exec(t), o = e ? this.getval(e) : ""; if (o) try { const t = JSON.parse(o); s = t ? this.lodash_get(t, i, "") : s } catch (t) { s = "" } } return s } setdata(t, s) { let e = !1; if (/^@/.test(s)) { const [, i, o] = /^@(.*?)\.(.*?)$/.exec(s), h = this.getval(i), a = i ? "null" === h ? null : h || "{}" : "{}"; try { const s = JSON.parse(a); this.lodash_set(s, o, t), e = this.setval(JSON.stringify(s), i) } catch (s) { const h = {}; this.lodash_set(h, o, t), e = this.setval(JSON.stringify(h), i) } } else e = $.setval(t, s); return e } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, s) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, s) : this.isQuanX() ? $prefs.setValueForKey(t, s) : this.isNode() ? (this.data = this.loaddata(), this.data[s] = t, this.writedata(), !0) : this.data && this.data[s] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, s = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? $httpClient.get(t, (t, e, i) => { !t && e && (e.body = i, e.statusCode = e.status), s(t, e, i) }) : this.isQuanX() ? $task.fetch(t).then(t => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, t => s(t)) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, s) => { try { const e = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); this.ckjar.setCookieSync(e, null), s.cookieJar = this.ckjar } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, t => s(t))) } post(t, s = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) $httpClient.post(t, (t, e, i) => { !t && e && (e.body = i, e.statusCode = e.status), s(t, e, i) }); else if (this.isQuanX()) t.method = "POST", $task.fetch(t).then(t => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, t => s(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: e, ...i } = t; this.got.post(e, i).then(t => { const { statusCode: e, statusCode: i, headers: o, body: h } = t; s(null, { status: e, statusCode: i, headers: o, body: h }, h) }, t => s(t)) } } time(t) { let s = { "M+": (new Date).getMonth() + 1, "d+": (new Date).getDate(), "H+": (new Date).getHours(), "m+": (new Date).getMinutes(), "s+": (new Date).getSeconds(), "q+": Math.floor(((new Date).getMonth() + 3) / 3), S: (new Date).getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, ((new Date).getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in s) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? s[e] : ("00" + s[e]).substr(("" + s[e]).length))); return t } msg(s = t, e = "", i = "", o) { const h = t => !t || !this.isLoon() && this.isSurge() ? t : "string" == typeof t ? this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : void 0 : "object" == typeof t && (t["open-url"] || t["media-url"]) ? this.isLoon() ? t["open-url"] : this.isQuanX() ? t : void 0 : void 0; this.isSurge() || this.isLoon() ? $notification.post(s, e, i, h(o)) : this.isQuanX() && $notify(s, e, i, h(o)), this.logs.push("", "==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="), this.logs.push(s), e && this.logs.push(e), i && this.logs.push(i) } log(...t) { t.length > 0 ? this.logs = [...this.logs, ...t] : console.log(this.logs.join(this.logSeparator)) } logErr(t, s) { const e = !this.isSurge() && !this.isQuanX() && !this.isLoon(); e ? $.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t.stack) : $.log("", `\u2757\ufe0f${this.name}, \u9519\u8bef!`, t) } wait(t) { return new Promise(s => setTimeout(s, t)) } done(t = {}) { const s = (new Date).getTime(), e = (s - this.startTime) / 1e3; this.log("", `\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${e} \u79d2`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, s) } diff --git a/jd_pet.js b/jd_pet.js index 22880358..e75e569d 100644 --- a/jd_pet.js +++ b/jd_pet.js @@ -1,6 +1,6 @@ /* -东东萌宠 更新地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js -更新时间:2021-01-10 +东东萌宠 更新地址: https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js +更新时间:2021-01-16 已支持IOS双京东账号,Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js @@ -10,17 +10,17 @@ =================================Quantumultx========================= [task_local] #东东萌宠 -15 6-18/6 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true +15 6-18/6 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js, tag=东东萌宠, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png, enabled=true =================================Loon=================================== [Script] -cron "15 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,tag=东东萌宠 +cron "15 6-18/6 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js,tag=东东萌宠 ===================================Surge================================ -东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js +东东萌宠 = type=cron,cronexp="15 6-18/6 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js ====================================小火箭============================= -东东萌宠 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js, cronexpr="15 6-18/6 * * *", timeout=200, enable=true +东东萌宠 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js, cronexpr="15 6-18/6 * * *", timeout=200, enable=true */ const $ = new Env('东东萌宠'); @@ -79,58 +79,62 @@ let randomCount = $.isNode() ? 20 : 5; $.done(); }) async function jdPet() { - //查询jd宠物信息 - const initPetTownRes = await request('initPetTown'); - message = `【京东账号${$.index}】${$.nickName}\n`; - if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { - $.petInfo = initPetTownRes.result; - if ($.petInfo.userStatus === 0) { - $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n萌宠活动未开启\n请手动去京东APP开启活动\n入口:我的->游戏与互动->查看更多开启`, { "open-url": "openapp.jdmoble://" }); - return - } - if (!$.petInfo.goodsInfo) { - $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`, { "open-url": "openapp.jdmoble://" }); - if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`); - return - } - goodsUrl = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsUrl; - // option['media-url'] = goodsUrl; - // console.log(`初始化萌宠信息完成: ${JSON.stringify(petInfo)}`); - if ($.petInfo.petStatus === 5) { - await slaveHelp();//可以兑换而没有去兑换,也能继续助力好友 - option['open-url'] = "openApp.jdMobile://"; - $.msg($.name, `【提醒⏰】${$.petInfo.goodsInfo.goodsName}已可领取`, '请去京东APP或微信小程序查看', option); - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n${$.petInfo.goodsInfo.goodsName}已可领取`); + try { + //查询jd宠物信息 + const initPetTownRes = await request('initPetTown'); + message = `【京东账号${$.index}】${$.nickName}\n`; + if (initPetTownRes.code === '0' && initPetTownRes.resultCode === '0' && initPetTownRes.message === 'success') { + $.petInfo = initPetTownRes.result; + if ($.petInfo.userStatus === 0) { + $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n萌宠活动未开启\n请手动去京东APP开启活动\n入口:我的->游戏与互动->查看更多开启`, { "open-url": "openapp.jdmoble://" }); + return } - return - } else if ($.petInfo.petStatus === 6) { - await slaveHelp();//已领取红包,但未领养新的,也能继续助力好友 - option['open-url'] = "openApp.jdMobile://"; - $.msg($.name, `【提醒⏰】已领取红包,但未继续领养新的物品`, '请去京东APP或微信小程序继续领养', option); - if ($.isNode()) { - await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n已领取红包,但未继续领养新的物品`); + if (!$.petInfo.goodsInfo) { + $.msg($.name, '', `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`, { "open-url": "openapp.jdmoble://" }); + if ($.isNode()) await notify.sendNotify(`${$.name} - ${$.index} - ${$.nickName}`, `【提示】京东账号${$.index}${$.nickName}\n暂未选购新的商品`); + return } - return - } - console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.petInfo.shareCode}\n`); - await taskInit(); - if ($.taskInit.resultCode === '9999' || !$.taskInit.result) { - console.log('初始化任务异常, 请稍后再试'); - return - } - $.taskInfo = $.taskInit.result; + goodsUrl = $.petInfo.goodsInfo && $.petInfo.goodsInfo.goodsUrl; + // option['media-url'] = goodsUrl; + // console.log(`初始化萌宠信息完成: ${JSON.stringify(petInfo)}`); + if ($.petInfo.petStatus === 5) { + await slaveHelp();//可以兑换而没有去兑换,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, `【提醒⏰】${$.petInfo.goodsInfo.goodsName}已可领取`, '请去京东APP或微信小程序查看', option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n${$.petInfo.goodsInfo.goodsName}已可领取`); + } + return + } else if ($.petInfo.petStatus === 6) { + await slaveHelp();//已领取红包,但未领养新的,也能继续助力好友 + option['open-url'] = "openApp.jdMobile://"; + $.msg($.name, `【提醒⏰】已领取红包,但未继续领养新的物品`, '请去京东APP或微信小程序继续领养', option); + if ($.isNode()) { + await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName || $.UserName}奖品已可领取`, `京东账号${$.index} ${$.nickName}\n已领取红包,但未继续领养新的物品`); + } + return + } + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.petInfo.shareCode}\n`); + await taskInit(); + if ($.taskInit.resultCode === '9999' || !$.taskInit.result) { + console.log('初始化任务异常, 请稍后再试'); + return + } + $.taskInfo = $.taskInit.result; - await petSport();//遛弯 - await slaveHelp();//助力好友 - await masterHelpInit();//获取助力的信息 - await doTask();//做日常任务 - await feedPetsAgain();//再次投食 - await energyCollect();//收集好感度 - await showMsg(); - console.log('全部任务完成, 如果帮助到您可以点下🌟STAR鼓励我一下, 明天见~'); - } else if (initPetTownRes.code === '0'){ - console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + await petSport();//遛弯 + await slaveHelp();//助力好友 + await masterHelpInit();//获取助力的信息 + await doTask();//做日常任务 + await feedPetsAgain();//再次投食 + await energyCollect();//收集好感度 + await showMsg(); + console.log('全部任务完成, 如果帮助到您可以点下🌟STAR鼓励我一下, 明天见~'); + } else if (initPetTownRes.code === '0'){ + console.log(`初始化萌宠失败: ${initPetTownRes.message}`); + } + } catch (e) { + $.logErr(e) } } // 收取所有好感度 @@ -439,7 +443,7 @@ async function showMsg() { } function readShareCode() { return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/pet/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/pet/read/${randomCount}/`, 'timeout': 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -497,7 +501,13 @@ function requireConfig() { }) if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; } else { - cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]); + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); } console.log(`共${cookiesArr.length}个京东账号\n`) if ($.isNode()) { @@ -627,5 +637,16 @@ function taskUrl(function_id, body = {}) { } }; } +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} // prettier-ignore function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,o)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=e&&e.timeout?e.timeout:o;const[r,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),h=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t))}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",o){const r=t=>{if(!t||!this.isLoon()&&this.isSurge())return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(o)):this.isQuanX()&&$notify(e,s,i,r(o)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_petTreasureBox.js b/jd_petTreasureBox.js index 3d089103..17ac2f16 100644 --- a/jd_petTreasureBox.js +++ b/jd_petTreasureBox.js @@ -10,15 +10,15 @@ hostname = jdjoy.jd.com,draw.jdfcloud.com surge [Script] -聚宝盆投狗粮辅助 = 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://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.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://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js Qx [rewrite_local] -^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js +^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox url script-response-body https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js LOON: [Script] -http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js, requires-body=true, timeout=10, tag=聚宝盆投狗粮辅助 +http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_petTreasureBox.js, requires-body=true, timeout=10, tag=聚宝盆投狗粮辅助 **/ let body = $response.body diff --git a/jd_pigPet.js b/jd_pigPet.js index ed8e6b86..82f9fe30 100644 --- a/jd_pigPet.js +++ b/jd_pigPet.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-10 14:07:07 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-11-23 12:27:16 */ /* diff --git a/jd_plantBean.js b/jd_plantBean.js index 8d132b7b..6cb9fc68 100644 --- a/jd_plantBean.js +++ b/jd_plantBean.js @@ -1,6 +1,6 @@ /* -种豆得豆 脚本更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js -更新时间:2020-12-31 +种豆得豆 脚本更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js +更新时间:2021-1-16 已支持IOS京东双账号,云端N个京东账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js 注:会自动关注任务中的店铺跟商品,介意者勿使用。 @@ -8,17 +8,17 @@ 每个京东账号每天只能帮助3个人。多出的助力码将会助力失败。 =====================================Quantumult X================================= [task_local] -1 7-21/2 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true +1 7-21/2 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, tag=种豆得豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png, enabled=true =====================================Loon================================ [Script] -cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 +cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 ======================================Surge========================== -京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js +京东种豆得豆 = type=cron,cronexp="1 7-21/2 * * *",wake-system=1,timeout=120,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js ====================================小火箭============================= -京东种豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=200, enable=true +京东种豆得豆 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js, cronexpr="1 7-21/2 * * *", timeout=200, enable=true 搬的https://github.com/uniqueque/QuantumultX/blob/4c1572d93d4d4f883f483f907120a75d925a693e/Script/jd_plantBean.js */ @@ -36,7 +36,7 @@ let shareCodes = [ // IOS本地脚本用户这个列表填入你要助力的好 //账号一的好友shareCode,不同好友的shareCode中间用@符号隔开 '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@e7lhibzb3zek32e72n4xesxmgc2m76eju62zk3y', //账号二的好友shareCode,不同好友的shareCode中间用@符号隔开 - 'olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy@4npkonnsy7xi3p6pjfxg6ct5gll42gmvnz7zgoy@6dygkptofggtp6ffhbowku3xgu@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy', + 'olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziyvnsb2r54jq34s64sc4it3jlfnejwmtmsuadax2i@eeexxudqtlampbpvmceutaaht5tcftvr6kohuny', ] let currentRoundId = null;//本期活动id let lastRoundId = null;//上期id @@ -81,32 +81,36 @@ let randomCount = $.isNode() ? 20 : 5; }) async function jdPlantBean() { - console.log(`获取任务及基本信息`) - await plantBeanIndex(); - // console.log(plantBeanIndexResult.data.taskList); - if ($.plantBeanIndexResult.code === '0') { - const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl - $.myPlantUuid = getParam(shareUrl, 'plantUuid') - console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`); - roundList = $.plantBeanIndexResult.data.roundList; - currentRoundId = roundList[1].roundId;//本期的roundId - lastRoundId = roundList[0].roundId;//上期的roundId - awardState = roundList[0].awardState; - $.taskList = $.plantBeanIndexResult.data.taskList; - subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`; - message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`; - message += `【上期成长值】${roundList[0].growth}\n`; - await receiveNutrients();//定时领取营养液 - await doHelp();//助力 - await doTask();//做日常任务 - await doEgg(); - await stealFriendWater(); - await doCultureBean(); - await doGetReward(); - await showTaskProcess(); - await plantShareSupportList(); - } else { - console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`); + try { + console.log(`获取任务及基本信息`) + await plantBeanIndex(); + // console.log(plantBeanIndexResult.data.taskList); + if ($.plantBeanIndexResult.code === '0') { + const shareUrl = $.plantBeanIndexResult.data.jwordShareInfo.shareUrl + $.myPlantUuid = getParam(shareUrl, 'plantUuid') + console.log(`\n【京东账号${$.index}(${$.nickName || $.UserName})的${$.name}好友互助码】${$.myPlantUuid}\n`); + roundList = $.plantBeanIndexResult.data.roundList; + currentRoundId = roundList[1].roundId;//本期的roundId + lastRoundId = roundList[0].roundId;//上期的roundId + awardState = roundList[0].awardState; + $.taskList = $.plantBeanIndexResult.data.taskList; + subTitle = `【京东昵称】${$.plantBeanIndexResult.data.plantUserInfo.plantNickName}`; + message += `【上期时间】${roundList[0].dateDesc.replace('上期 ', '')}\n`; + message += `【上期成长值】${roundList[0].growth}\n`; + await receiveNutrients();//定时领取营养液 + await doHelp();//助力 + await doTask();//做日常任务 + await doEgg(); + await stealFriendWater(); + await doCultureBean(); + await doGetReward(); + await showTaskProcess(); + await plantShareSupportList(); + } else { + console.log(`种豆得豆-初始失败: ${JSON.stringify($.plantBeanIndexResult)}`); + } + } catch (e) { + $.logErr(e); } } async function doGetReward() { @@ -514,7 +518,7 @@ async function plantBeanIndex() { } function readShareCode() { return new Promise(async resolve => { - $.get({url: `http://api.turinglabs.net/api/v1/jd/bean/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => { + $.get({url: `http://jd.turinglabs.net/api/v2/jd/bean/read/${randomCount}/`, timeout: 10000}, (err, resp, data) => { try { if (err) { console.log(`${JSON.stringify(err)}`) @@ -571,7 +575,13 @@ function requireConfig() { }) if (process.env.JD_DEBUG && process.env.JD_DEBUG === 'false') console.log = () => {}; } else { - cookiesArr.push(...[$.getdata('CookieJD'), $.getdata('CookieJD2')]); + let cookiesData = $.getdata('CookiesJD') || "[]"; + cookiesData = jsonParse(cookiesData); + cookiesArr = cookiesData.map(item => item.cookie); + cookiesArr.reverse(); + cookiesArr.push(...[$.getdata('CookieJD2'), $.getdata('CookieJD')]); + cookiesArr.reverse(); + cookiesArr = cookiesArr.filter(item => item !== "" && item !== null && item !== undefined); } console.log(`共${cookiesArr.length}个京东账号\n`) if ($.isNode()) { @@ -741,5 +751,16 @@ function getParam(url, name) { if (r != null) return unescape(r[2]); return null; } +function jsonParse(str) { + if (typeof str == "string") { + try { + return JSON.parse(str); + } catch (e) { + console.log(e); + $.msg($.name, '', '请勿随意在BoxJs输入框修改内容\n建议通过脚本去获取cookie') + return []; + } + } +} // prettier-ignore function Env(t,e){class s{constructor(t){this.env=t}send(t,e="GET"){t="string"==typeof t?{url:t}:t;let s=this.get;return"POST"===e&&(s=this.post),new Promise((e,i)=>{s.call(this,t,(t,s,o)=>{t?i(t):e(s)})})}get(t){return this.send.call(this.env,t)}post(t){return this.send.call(this.env,t,"POST")}}return new class{constructor(t,e){this.name=t,this.http=new s(this),this.data=null,this.dataFile="box.dat",this.logs=[],this.isMute=!1,this.logSeparator="\n",this.startTime=(new Date).getTime(),Object.assign(this,e),this.log("",`\ud83d\udd14${this.name}, \u5f00\u59cb!`)}isNode(){return"undefined"!=typeof module&&!!module.exports}isQuanX(){return"undefined"!=typeof $task}isSurge(){return"undefined"!=typeof $httpClient&&"undefined"==typeof $loon}isLoon(){return"undefined"!=typeof $loon}toObj(t,e=null){try{return JSON.parse(t)}catch{return e}}toStr(t,e=null){try{return JSON.stringify(t)}catch{return e}}getjson(t,e){let s=e;const i=this.getdata(t);if(i)try{s=JSON.parse(this.getdata(t))}catch{}return s}setjson(t,e){try{return this.setdata(JSON.stringify(t),e)}catch{return!1}}getScript(t){return new Promise(e=>{this.get({url:t},(t,s,i)=>e(i))})}runScript(t,e){return new Promise(s=>{let i=this.getdata("@chavy_boxjs_userCfgs.httpapi");i=i?i.replace(/\n/g,"").trim():i;let o=this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout");o=o?1*o:20,o=e&&e.timeout?e.timeout:o;const[r,h]=i.split("@"),a={url:`http://${h}/v1/scripting/evaluate`,body:{script_text:t,mock_type:"cron",timeout:o},headers:{"X-Key":r,Accept:"*/*"}};this.post(a,(t,e,i)=>s(i))}).catch(t=>this.logErr(t))}loaddata(){if(!this.isNode())return{};{this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e);if(!s&&!i)return{};{const i=s?t:e;try{return JSON.parse(this.fs.readFileSync(i))}catch(t){return{}}}}}writedata(){if(this.isNode()){this.fs=this.fs?this.fs:require("fs"),this.path=this.path?this.path:require("path");const t=this.path.resolve(this.dataFile),e=this.path.resolve(process.cwd(),this.dataFile),s=this.fs.existsSync(t),i=!s&&this.fs.existsSync(e),o=JSON.stringify(this.data);s?this.fs.writeFileSync(t,o):i?this.fs.writeFileSync(e,o):this.fs.writeFileSync(t,o)}}lodash_get(t,e,s){const i=e.replace(/\[(\d+)\]/g,".$1").split(".");let o=t;for(const t of i)if(o=Object(o)[t],void 0===o)return s;return o}lodash_set(t,e,s){return Object(t)!==t?t:(Array.isArray(e)||(e=e.toString().match(/[^.[\]]+/g)||[]),e.slice(0,-1).reduce((t,s,i)=>Object(t[s])===t[s]?t[s]:t[s]=Math.abs(e[i+1])>>0==+e[i+1]?[]:{},t)[e[e.length-1]]=s,t)}getdata(t){let e=this.getval(t);if(/^@/.test(t)){const[,s,i]=/^@(.*?)\.(.*?)$/.exec(t),o=s?this.getval(s):"";if(o)try{const t=JSON.parse(o);e=t?this.lodash_get(t,i,""):e}catch(t){e=""}}return e}setdata(t,e){let s=!1;if(/^@/.test(e)){const[,i,o]=/^@(.*?)\.(.*?)$/.exec(e),r=this.getval(i),h=i?"null"===r?null:r||"{}":"{}";try{const e=JSON.parse(h);this.lodash_set(e,o,t),s=this.setval(JSON.stringify(e),i)}catch(e){const r={};this.lodash_set(r,o,t),s=this.setval(JSON.stringify(r),i)}}else s=this.setval(t,e);return s}getval(t){return this.isSurge()||this.isLoon()?$persistentStore.read(t):this.isQuanX()?$prefs.valueForKey(t):this.isNode()?(this.data=this.loaddata(),this.data[t]):this.data&&this.data[t]||null}setval(t,e){return this.isSurge()||this.isLoon()?$persistentStore.write(t,e):this.isQuanX()?$prefs.setValueForKey(t,e):this.isNode()?(this.data=this.loaddata(),this.data[e]=t,this.writedata(),!0):this.data&&this.data[e]||null}initGotEnv(t){this.got=this.got?this.got:require("got"),this.cktough=this.cktough?this.cktough:require("tough-cookie"),this.ckjar=this.ckjar?this.ckjar:new this.cktough.CookieJar,t&&(t.headers=t.headers?t.headers:{},void 0===t.headers.Cookie&&void 0===t.cookieJar&&(t.cookieJar=this.ckjar))}get(t,e=(()=>{})){t.headers&&(delete t.headers["Content-Type"],delete t.headers["Content-Length"]),this.isSurge()||this.isLoon()?$httpClient.get(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)}):this.isQuanX()?$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)):this.isNode()&&(this.initGotEnv(t),this.got(t).on("redirect",(t,e)=>{try{const s=t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString();this.ckjar.setCookieSync(s,null),e.cookieJar=this.ckjar}catch(t){this.logErr(t)}}).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t)))}post(t,e=(()=>{})){if(t.body&&t.headers&&!t.headers["Content-Type"]&&(t.headers["Content-Type"]="application/x-www-form-urlencoded"),t.headers&&delete t.headers["Content-Length"],this.isSurge()||this.isLoon())$httpClient.post(t,(t,s,i)=>{!t&&s&&(s.body=i,s.statusCode=s.status),e(t,s,i)});else if(this.isQuanX())t.method="POST",$task.fetch(t).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t));else if(this.isNode()){this.initGotEnv(t);const{url:s,...i}=t;this.got.post(s,i).then(t=>{const{statusCode:s,statusCode:i,headers:o,body:r}=t;e(null,{status:s,statusCode:i,headers:o,body:r},r)},t=>e(t))}}time(t){let e={"M+":(new Date).getMonth()+1,"d+":(new Date).getDate(),"H+":(new Date).getHours(),"m+":(new Date).getMinutes(),"s+":(new Date).getSeconds(),"q+":Math.floor(((new Date).getMonth()+3)/3),S:(new Date).getMilliseconds()};/(y+)/.test(t)&&(t=t.replace(RegExp.$1,((new Date).getFullYear()+"").substr(4-RegExp.$1.length)));for(let s in e)new RegExp("("+s+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?e[s]:("00"+e[s]).substr((""+e[s]).length)));return t}msg(e=t,s="",i="",o){const r=t=>{if(!t||!this.isLoon()&&this.isSurge())return t;if("string"==typeof t)return this.isLoon()?t:this.isQuanX()?{"open-url":t}:void 0;if("object"==typeof t){if(this.isLoon()){let e=t.openUrl||t["open-url"],s=t.mediaUrl||t["media-url"];return{openUrl:e,mediaUrl:s}}if(this.isQuanX()){let e=t["open-url"]||t.openUrl,s=t["media-url"]||t.mediaUrl;return{"open-url":e,"media-url":s}}}};this.isMute||(this.isSurge()||this.isLoon()?$notification.post(e,s,i,r(o)):this.isQuanX()&&$notify(e,s,i,r(o)));let h=["","==============\ud83d\udce3\u7cfb\u7edf\u901a\u77e5\ud83d\udce3=============="];h.push(e),s&&h.push(s),i&&h.push(i),console.log(h.join("\n")),this.logs=this.logs.concat(h)}log(...t){t.length>0&&(this.logs=[...this.logs,...t]),console.log(t.join(this.logSeparator))}logErr(t,e){const s=!this.isSurge()&&!this.isQuanX()&&!this.isLoon();s?this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t.stack):this.log("",`\u2757\ufe0f${this.name}, \u9519\u8bef!`,t)}wait(t){return new Promise(e=>setTimeout(e,t))}done(t={}){const e=(new Date).getTime(),s=(e-this.startTime)/1e3;this.log("",`\ud83d\udd14${this.name}, \u7ed3\u675f! \ud83d\udd5b ${s} \u79d2`),this.log(),(this.isSurge()||this.isQuanX()||this.isLoon())&&$done(t)}}(t,e)} diff --git a/jd_redPacket.js b/jd_redPacket.js index 827aeb2f..a63bd24e 100644 --- a/jd_redPacket.js +++ b/jd_redPacket.js @@ -1,7 +1,7 @@ /* - * @Author: lxk0301 + * @Author: LXK9301 * @Date: 2020-11-03 18:12:38 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2020-12-20 12:27:18 */ /* @@ -18,12 +18,12 @@ QuantumultX [task_local] #京东全民开红包 -1 1 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true +1 1 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png, enabled=true Loon [Script] -cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 +cron "1 1 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 Surge -京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js +京东全民开红包 = type=cron,cronexp=1 1 * * *,wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_redPacket.js */ const $ = new Env('京东全民开红包'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_shop.js b/jd_shop.js index 7e6cff97..0e2ad153 100644 --- a/jd_shop.js +++ b/jd_shop.js @@ -6,12 +6,12 @@ // quantumultx [task_local] #进店领豆 - 10 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true + 10 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js, tag=进店领豆, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_shop.png, enabled=true //Loon [Script] - cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js,tag=进店领豆 + cron "10 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js,tag=进店领豆 //Surge - 进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js + 进店领豆 = type=cron,cronexp="10 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_shop.js * */ const $ = new Env('进店领豆'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/jd_small_home.js b/jd_small_home.js index ae51ac25..7f294200 100644 --- a/jd_small_home.js +++ b/jd_small_home.js @@ -1,11 +1,11 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-12 11:42:12 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2021-1-4 14:27:20 */ /* -东东小窝 https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js +东东小窝 https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js 现有功能: 做日常任务任务,每日抽奖(有机会活动京豆,使用的是免费机会,不消耗WO币) 自动使用WO币购买装饰品可以获得京豆,分别可获得5,20,50,100,200,400,700,1200京豆) @@ -25,17 +25,17 @@ https://h5.m.jd.com/babelDiy/Zeus/2HFSytEAN99VPmMGZ6V4EYWus1x/index.html ===============Quantumultx=============== [task_local] #东东小窝 -16 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png enabled=true +16 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝, img-url=https://raw.githubusercontent.com/58xinian/icon/master/ddxw.png enabled=true ================Loon============== [Script] -cron "16 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝 +cron "16 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, tag=东东小窝 ===============Surge================= -东东小窝 = type=cron,cronexp="16 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js +东东小窝 = type=cron,cronexp="16 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js ============小火箭========= -东东小窝 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, cronexpr="16 0 * * *", timeout=200, enable=true +东东小窝 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_small_home.js, cronexpr="16 0 * * *", timeout=200, enable=true */ const $ = new Env('东东小窝'); const notify = $.isNode() ? require('./sendNotify') : ''; @@ -100,7 +100,7 @@ const JD_API_HOST = 'https://lkyl.dianpusoft.cn/api'; console.log(`\n${$.UserName} 去给自己的下一账号 ${decodeURIComponent($.newShareCodes[(i + 1) % $.newShareCodes.length]['cookie'].match(/pt_pin=(.+?);/) && $.newShareCodes[(i + 1) % $.newShareCodes.length]['cookie'].match(/pt_pin=(.+?);/)[1])}助力,助力码为 ${code}\n`) await createAssistUser(code, $.createAssistUserID); } - console.log(`\n去帮助作者:lxk0301\n`) + console.log(`\n去帮助作者:LXK9301\n`) await helpFriends(); } } @@ -786,7 +786,7 @@ function login(userName) { }) }) } -function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') { +function updateInviteCode(url = 'https://raw.githubusercontent.com/LXK9301/updateTeam/master/jd_updateSmallHomeInviteCode.json') { return new Promise(resolve => { $.get({url}, async (err, resp, data) => { try { @@ -803,7 +803,7 @@ function updateInviteCode(url = 'https://raw.githubusercontent.com/lxk0301/updat }) }) } -function updateInviteCodeCDN(url = 'https://raw.fastgit.org/lxk0301/updateTeam/master/jd_updateSmallHomeInviteCode.json') { +function updateInviteCodeCDN(url) { return new Promise(async resolve => { $.get({url}, async (err, resp, data) => { try { diff --git a/jd_speed.js b/jd_speed.js index 826ca84e..909231bc 100644 --- a/jd_speed.js +++ b/jd_speed.js @@ -1,5 +1,5 @@ /* -京东天天加速链接:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js +京东天天加速链接:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js 更新时间:2020-12-25 支持京东双账号 脚本兼容: QuantumultX, Surge, Loon, JSBox, Node.js @@ -10,12 +10,12 @@ // quantumultx // [task_local] // #天天加速 -// 8 */3 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true +// 8 */3 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js, tag=京东天天加速, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png, enabled=true // Loon // [Script] -// cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js,tag=京东天天加速 +// cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js,tag=京东天天加速 // Surge -//天天加速 = type=cron,cronexp="8 */3 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js +//天天加速 = type=cron,cronexp="8 */3 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js const $ = new Env('✈️天天加速'); const notify = $.isNode() ? require('./sendNotify') : ''; //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/jd_syj.js b/jd_syj.js index 91b59f25..13745cee 100644 --- a/jd_syj.js +++ b/jd_syj.js @@ -1,29 +1,29 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-11-27 09:19:21 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2021-1-1 16:58:02 */ /* 十元街脚本,一周签到下来可获得30京豆,一天任意时刻运行一次即可 -更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js +更新地址:https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js 参考github@jidesheng6修改而来 已支持IOS双京东账号, Node.js支持N个京东账号 脚本兼容: QuantumultX, Surge, Loon, 小火箭,JSBox, Node.js ============Quantumultx=============== [task_local] #十元街 -10 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true +10 7 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_syj.png, enabled=true ================Loon============== [Script] -cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街 +cron "10 7 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, tag=十元街 ===============Surge================= -十元街 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js +十元街 = type=cron,cronexp="10 7 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js ============小火箭========= -十元街 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, cronexpr="10 7 * * *", timeout=200, enable=true +十元街 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_syj.js, cronexpr="10 7 * * *", timeout=200, enable=true */ const $ = new Env('十元街'); diff --git a/jd_unbind.js b/jd_unbind.js index 8aa04381..5a8666f9 100644 --- a/jd_unbind.js +++ b/jd_unbind.js @@ -6,14 +6,14 @@ ==========Quantumult X========== [task_local] #注销京东会员卡 -55 23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, tag=注销京东会员卡, enabled=true +55 23 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js, tag=注销京东会员卡, enabled=true =======Loon======== [Script] -cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js,tag=注销京东会员卡 +cron "55 23 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js,tag=注销京东会员卡 ========Surge========== -注销京东会员卡 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=620,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js +注销京东会员卡 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=620,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js =======小火箭===== -注销京东会员卡 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js, cronexpr="10 23 * * *", timeout=200, enable=true +注销京东会员卡 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js, cronexpr="10 23 * * *", timeout=200, enable=true */ const $ = new Env('注销京东会员卡'); //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/jd_unsubscribe.js b/jd_unsubscribe.js index a8544428..c020b818 100644 --- a/jd_unsubscribe.js +++ b/jd_unsubscribe.js @@ -9,12 +9,12 @@ // Quantumult X [task_local] #取关京东店铺商品 -55 23 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js, tag=取关京东店铺商品, enabled=true +55 23 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js, tag=取关京东店铺商品, enabled=true // Loon [Script] -cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品 +cron "55 23 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品 // Surge -取关京东店铺商品 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js +取关京东店铺商品 = type=cron,cronexp="55 23 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js */ const $ = new Env('取关京东店铺和商品'); //Node.js用户请在jdCookie.js处填写京东ck; diff --git a/jx_sign.js b/jx_sign.js index 185d2a09..1955c3ed 100644 --- a/jx_sign.js +++ b/jx_sign.js @@ -5,17 +5,17 @@ ============Quantumultx=============== [task_local] #京喜签到 -5 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js, tag=京喜签到, enabled=true +5 0 * * * https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js, tag=京喜签到, enabled=true ================Loon============== [Script] -cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js,tag=京喜签到 +cron "5 0 * * *" script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js,tag=京喜签到 ===============Surge================= -京喜签到 = type=cron,cronexp="5 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js +京喜签到 = type=cron,cronexp="5 0 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js ============小火箭========= -京喜签到 = type=cron,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jx_sign.js, cronexpr="5 0 * * *", timeout=200, enable=true +京喜签到 = type=cron,script-path=https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jx_sign.js, cronexpr="5 0 * * *", timeout=200, enable=true */ const $ = new Env('京喜签到'); const notify = $.isNode() ? require('./sendNotify') : ''; diff --git a/lxk0301.boxjs.json b/lxk0301.boxjs.json index 8b1a8ce7..0f973302 100644 --- a/lxk0301.boxjs.json +++ b/lxk0301.boxjs.json @@ -1,9 +1,9 @@ { - "id": "lxk0301.app.sub", - "name": "lxk0301脚本订阅", - "author": "@lxk0301", + "id": "LXK9301.app.sub", + "name": "LXK9301脚本订阅", + "author": "@LXK9301", "icon": "https://avatars0.githubusercontent.com/u/21308593?s=52&v=4", - "repo": "https://github.com/lxk0301/jd_scripts/", + "repo": "https://github.com/LXK9301/jd_scripts/", "apps": [ { "id": "JD_Cookies", @@ -11,7 +11,7 @@ "keys": ["CookiesJD"], "descs_html": [ "请勿随意在输入框修改内容,建议通过脚本去获取cookie,若要修改,请按照JSON 格式修改。", - "脚本地址【京东多 CK获取】,并按照此脚本注释进行配置", + "脚本地址【京东多 CK获取】,并按照此脚本注释进行配置", "使用方式【个人中心】获取对应的数据Code" ], "settings": [ @@ -48,8 +48,8 @@ "desc": "不懂不知不会UserAgent的请不要随意填写内容" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", "icons": [ "https://raw.githubusercontent.com/Orz-3/mini/master/jd.png", "https://raw.githubusercontent.com/Orz-3/task/master/jd.png" @@ -159,9 +159,9 @@ "desc": "京东水果互助码.这是别人的shareCode,你帮别人助力." } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_fruit.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdnc_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdnc.png" @@ -277,9 +277,9 @@ "desc": "东东萌宠互助码.这是别人的shareCode,你帮别人助力." } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_pet.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdmc_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdmc.png" @@ -363,9 +363,9 @@ "desc": "种豆得豆互助码.这是别人的助力码,你帮别人助力." } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_plantBean.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdzd_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdzd.png" @@ -430,9 +430,9 @@ ] } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdcww_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png" @@ -476,9 +476,9 @@ ] } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_reward.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdcww_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png" @@ -555,9 +555,9 @@ "desc": "多个账号使用英文逗号','隔开,最多6个" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_joy_run.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdcww_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png" @@ -583,9 +583,9 @@ "desc": "是否卖出金果获得金币,金币具有有效期,默认不卖出" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_moneyTree.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdyqs_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdyqs.png" @@ -604,9 +604,9 @@ "desc": "运行京东天天加速脚本时不发出系统弹窗通知" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_speed.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jdjs_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jdjs.png" @@ -656,9 +656,9 @@ "desc": "匹配到此处店铺后面(包括此店铺)的不再进行取关(此处内容请尽量从头开始输入店铺名称)" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unsubscribe.js", "icons": [ "https://raw.githubusercontent.com/Orz-3/mini/master/jd.png", "https://raw.githubusercontent.com/Orz-3/task/master/jd.png" @@ -694,9 +694,9 @@ "desc": "不想注销的店铺会员卡名称" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unbind.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_unbind.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jd_unbind.png" @@ -736,12 +736,12 @@ "desc": "运行脚本消耗金币进行抽奖,默认抽奖" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", "scripts":[ { "name" : "京小超", - "script" : "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js" + "script" : "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_superMarket.js" } ], "icons": [ @@ -772,12 +772,12 @@ "desc": "输入兑换奖品名称(默认不兑换奖品)" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", "scripts": [ { "name" : "京小超兑换奖品", - "script" : "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js" + "script" : "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_blueCoin.js" } ], "icons": [ @@ -786,7 +786,7 @@ ] }, { - "id": "lxk0301Webhook", + "id": "LXK9301Webhook", "name": "Webhook", "keys": [ "ACTIONS_TRIGGER_TOKEN", @@ -807,7 +807,7 @@ "name": "github 用户名", "val": "", "type": "text", - "desc": "例如:lxk0301" + "desc": "例如:LXK9301" }, { "id": "repo", @@ -824,9 +824,9 @@ "desc": ".github/workflows/路径里面yml文件repository_dispatch项目的types值,例如jd_fruit.yml里面的值为fruit,多个使用英文逗号','隔开" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/webhook.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/webhook.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/webhooks_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/webhooks.png" @@ -863,9 +863,9 @@ "desc": "需要修改最小的运动步数的数字,例如:25000" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/backUp/xmSports.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/xmyd_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/xmyd.png" @@ -886,9 +886,9 @@ "desc": "请尽量填写完整和别的商品有区分度" } ], - "author": "@lxk0301", - "repo": "https://github.com/lxk0301/jd_scripts", - "script": "https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js", + "author": "@LXK9301", + "repo": "https://github.com/LXK9301/jd_scripts", + "script": "https://raw.githubusercontent.com/LXK9301/jd_scripts/master/jd_jdfactory.js", "icons": [ "https://raw.githubusercontent.com/58xinian/icon/master/jd_factory_mini.png", "https://raw.githubusercontent.com/58xinian/icon/master/jd_factory.png" diff --git a/package-lock.json b/package-lock.json index e8928fdd..4a628fe1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "lxk0301", + "name": "LXK9301", "version": "1.0.0", "lockfileVersion": 1, "requires": true, @@ -1145,6 +1145,11 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "qrcode-terminal": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/qrcode-terminal/-/qrcode-terminal-0.12.0.tgz", + "integrity": "sha512-EXtzRZmC+YGmGlDFbXKxQiMZNwCLEO6BANKXG4iCtSIM0yqc/pappSx3RIKr4r0uh5JsBckOXeKrB3Iz7mdQpQ==" + }, "qs": { "version": "6.9.4", "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", @@ -1376,6 +1381,11 @@ "escape-string-regexp": "^1.0.2" } }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==" + }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", diff --git a/package.json b/package.json index cc975ff5..eda676a7 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "lxk0301", + "name": "LXK9301", "version": "1.0.0", "description": "{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}", "main": "AlipayManor.js", @@ -8,12 +8,12 @@ }, "repository": { "type": "git", - "url": "https://github.com/lxk0301/jd_scripts.git" + "url": "https://github.com/LXK9301/jd_scripts.git" }, "keywords": [ "京东薅羊毛工具, 京东水果、宠物、种豆等等" ], - "author": "lxk0301", + "author": "LXK9301", "license": "ISC", "dependencies": { "crypto-js": "^4.0.0", diff --git a/sendNotify.js b/sendNotify.js index d46bf5e9..742bd37b 100644 --- a/sendNotify.js +++ b/sendNotify.js @@ -1,62 +1,59 @@ /* - * @Author: lxk0301 https://github.com/lxk0301 + * @Author: LXK9301 https://github.com/LXK9301 * @Date: 2020-08-19 16:12:40 - * @Last Modified by: lxk0301 + * @Last Modified by: LXK9301 * @Last Modified time: 2021-1-7 17:52:54 */ const querystring = require("querystring"); const $ = new Env(); // =======================================微信server酱通知设置区域=========================================== //此处填你申请的SCKEY. -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入PUSH_KEY) +//(环境变量名 PUSH_KEY) let SCKEY = ''; // =======================================QQ酷推通知设置区域=========================================== //此处填你申请的SKEY(具体详见文档 https://cp.xuthus.cc/) -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QQ_SKEY) +//(环境变量名 QQ_SKEY) let QQ_SKEY = ''; //此处填写私聊或群组推送,默认私聊(send[私聊]、group[群聊]、wx[个微]、ww[企微]、email[邮件]) let QQ_MODE = 'send'; // =======================================Bark App通知设置区域=========================================== //此处填你BarkAPP的信息(IP/设备码,例如:https://api.day.app/XXXXXXXX) -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入BARK_PUSH) let BARK_PUSH = ''; //BARK app推送铃声,铃声列表去APP查看复制填写 -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入BARK_SOUND , Value输入app提供的铃声名称,例如:birdsong) let BARK_SOUND = ''; // =======================================telegram机器人通知设置区域=========================================== //此处填你telegram bot 的Token,例如:1077xxx4424:AAFjv0FcqxxxxxxgEMGfi22B4yh15R5uw -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入TG_BOT_TOKEN) +//(环境变量名 TG_BOT_TOKEN) let TG_BOT_TOKEN = ''; //此处填你接收通知消息的telegram用户的id,例如:129xxx206 -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入TG_USER_ID) +//(环境变量名 TG_USER_ID) let TG_USER_ID = ''; // =======================================钉钉机器人通知设置区域=========================================== //此处填你钉钉 bot 的webhook,例如:5a544165465465645d0f31dca676e7bd07415asdasd -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入DD_BOT_TOKEN) +//(环境变量名 DD_BOT_TOKEN) let DD_BOT_TOKEN = ''; //密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串 let DD_BOT_SECRET = ''; // =======================================企业微信机器人通知设置区域=========================================== //此处填你企业微信机器人的 webhook(详见文档 https://work.weixin.qq.com/api/doc/90000/90136/91770),例如:693a91f6-7xxx-4bc4-97a0-0ec2sifa5aaa -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_KEY) +//(环境变量名 QYWX_KEY) let QYWX_KEY = ''; // =======================================企业微信应用消息通知设置区域=========================================== -//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://github.com/lxk0301/jd_scripts/issues/519) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat +//此处填你企业微信应用消息的 值(详见文档 https://work.weixin.qq.com/api/doc/90000/90135/90236),依次填上corpid的值,corpsecret的值,touser的值,agentid的值,素材库图片id(见https://github.com/LXK9301/jd_scripts/issues/519) 注意用,号隔开,例如:wwcff56746d9adwers,B-791548lnzXBE6_BWfxdf3kSTMJr9vFEPKAbh6WERQ,mingcheng,1000001,2COXgjH2UIfERF2zxrtUOKgQ9XklUqMdGSWLBoW_lSDAdafat //增加一个选择推送消息类型,用图文消息直接填写素材库图片id的值,用卡片消息就填写0(就是数字零) -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入QYWX_AM) +//(环境变量名 QYWX_AM) let QYWX_AM = ''; // =======================================iGot聚合推送通知设置区域=========================================== //此处填您iGot的信息(推送key,例如:https://push.hellyw.com/XXXXXXXX) -//注:此处设置github action用户填写到Settings-Secrets里面(Name输入IGOT_PUSH_KEY) let IGOT_PUSH_KEY = ''; // =======================================push+设置区域======================================= @@ -133,6 +130,7 @@ if (process.env.PUSH_PLUS_USER) { async function sendNotify(text, desp, params = {}) { //提供7种通知 + desp += `\n本脚本开源免费使用 By:https://github.com/LXK9301/jd_scripts`; await Promise.all([ serverNotify(text, desp),//微信server酱 pushPlusNotify(text, desp)//pushplus(推送加)