├── .gitattributes ├── .github ├── pull.yml ├── scripts │ ├── jd_sharecodes.sh │ └── set_jd_time.js └── workflows │ ├── jd_bean_exchange.yml │ ├── jd_bean_sign.yml │ ├── jd_blueCoin.yml │ ├── jd_bookshop.yml │ ├── jd_crazy_joy.yml │ ├── jd_daily_egg.yml │ ├── jd_fruit.yml │ ├── jd_jdfactory.yml │ ├── jd_joy.yml │ ├── jd_joy_feedPets.yml │ ├── jd_joy_reward.yml │ ├── jd_joy_steal.yml │ ├── jd_live.yml │ ├── jd_lotteryMachine.yml │ ├── jd_moneyTree.yml │ ├── jd_necklace.yml │ ├── jd_pet.yml │ ├── jd_pigPet.yml │ ├── jd_plantBean.yml │ ├── jd_rankingList.yml │ ├── jd_redPacket.yml │ ├── jd_sharecode.yml │ ├── jd_shop.yml │ ├── jd_small_home.yml │ ├── jd_speed.yml │ ├── jd_superMarket.yml │ ├── jd_syj.yml │ ├── jd_unsubscribe.yml │ └── shylocks.yml ├── .gitignore ├── Env.min.js ├── JD_extra_cookie.js ├── LICENSE ├── Loon └── lxk0301_LoonTask.conf ├── QuantumultX ├── 3B3B3933-D53E-42BA-842F-2DA525FDEB18.jpeg └── lxk0301_gallery.json ├── README.md ├── Surge └── lxk0301_Task.sgmodule.sgmodule ├── activity ├── jd_818.js ├── jd_apple_live.js ├── jd_collectProduceScore.js ├── jd_digital_floor.js ├── jd_jxstory.js ├── jd_live_redrain2.js ├── jd_mohe.js ├── jd_pubg.js ├── jd_split.js └── jd_xtg.js ├── backUp ├── AlipayManor.js ├── GetJdCookie.md ├── GetJdCookie2.md ├── TG_PUSH.md ├── cashSign.js ├── gitSync.md ├── iepngs.boxjs.json ├── jd_Goods.js ├── jd_fruit_double.js ├── jd_joy2.js ├── jd_joy_help2.js ├── jd_moneyTree2.js ├── jd_pet_double.js ├── jd_plantBean_double.js ├── jd_speed2.js ├── mySelf.boxjs.json ├── qqread.js ├── webhook.js ├── xmSports.js └── xmly_speed_ccokie.js ├── docker ├── Dockerfile ├── Readme.md ├── crontab_list.sh ├── crontab_list_ts.sh ├── default_task.sh ├── docker-compose.yml ├── docker_entrypoint.sh ├── docker多账户使用独立容器使用说明.md ├── example │ ├── custom-append.yml │ ├── custom-overwrite.yml │ ├── default.yml │ ├── docker多账户使用独立容器使用说明.md │ ├── jd_scripts.custom-append.syno.json │ ├── jd_scripts.custom-overwrite.syno.json │ ├── jd_scripts.syno.json │ ├── multi.yml │ └── use-tg-bot.yml ├── jd_scripts.my_crontab_list.syno.json ├── jd_scripts.syno.json └── notify_docker_user.js ├── githubAction.md ├── iCloud.md ├── icon ├── DD_bot.png ├── Snipaste_2020-08-28_09-31-42.png ├── TG_PUSH1.png ├── TG_PUSH2.png ├── TG_PUSH3.png ├── action1.png ├── action2.png ├── action3.png ├── bark.jpg ├── bean_sign_simple.jpg ├── disable-action.jpg ├── fork.png ├── git1.jpg ├── git10.jpg ├── git11.jpg ├── git12.jpg ├── git13.jpg ├── git14.jpg ├── git2.jpg ├── git3.jpg ├── git4.jpg ├── git5.jpg ├── git6.jpg ├── git7.png ├── git8.jpg ├── git9.jpg ├── iCloud1.png ├── iCloud2.png ├── iCloud3.png ├── iCloud4.png ├── iCloud5.png ├── iCloud6.png ├── jd1.jpg ├── jd2.jpg ├── jd3.jpg ├── jd4.jpg ├── jd5.png ├── jd6.png ├── jd7.png ├── jd8.png ├── jd_moneyTree.png ├── jd_pet.png ├── thanks.jpg └── txy.png ├── index.js ├── jdCookie.js ├── jdDreamFactoryShareCodes.js ├── jdFactoryShareCodes.js ├── jdFruitShareCodes.js ├── jdJxStoryShareCodes.js ├── jdPetShareCodes.js ├── jdPlantBeanShareCodes.js ├── jdSuperMarketShareCodes.js ├── jd_818.js ├── jd_apple_live.js ├── jd_bean_change.js ├── jd_bean_home.js ├── jd_bean_sign.js ├── jd_blueCoin.js ├── jd_car.js ├── jd_club_lottery.js ├── jd_collectProduceScore.js ├── jd_daily_egg.js ├── jd_digital_floor.js ├── jd_dreamFactory.js ├── jd_ds.js ├── jd_fruit.js ├── jd_health.js ├── jd_jdfactory.js ├── jd_jdh.js ├── jd_jdzz.js ├── jd_joy.js ├── jd_joy_feedPets.js ├── jd_joy_help.js ├── jd_joy_reward.js ├── jd_joy_run.js ├── jd_joy_steal.js ├── jd_jxstory.js ├── jd_kd.js ├── jd_live.js ├── jd_live_redrain.js ├── jd_lotteryMachine.js ├── jd_mohe.js ├── jd_moneyTree.js ├── jd_ms_redrain.js ├── jd_necklace.js ├── jd_pet.js ├── jd_petTreasureBox.js ├── jd_pigPet.js ├── jd_plantBean.js ├── jd_pubg.js ├── jd_rankingList.js ├── jd_redPacket.js ├── jd_shop.js ├── jd_small_home.js ├── jd_speed.js ├── jd_split.js ├── jd_superMarket.js ├── jd_syj.js ├── jd_unsubscribe.js ├── jd_watch.js ├── jd_xtg.js ├── jr_sign.js ├── lxk0301.boxjs.json ├── package-lock.json ├── package.json ├── sendNotify.js ├── serverless.yml ├── tencentscf.md ├── test2.js └── yarn.lock /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/pull.yml: -------------------------------------------------------------------------------- 1 | version: "1" 2 | rules: # Array of rules 3 | - base: main # Required. Target branch 4 | upstream: lifeishard4me:main # Required. Must be in the same fork network. 5 | mergeMethod: merge # Optional, one of [none, merge, squash, rebase, hardreset], Default: none. 6 | mergeUnstable: true # Optional, merge pull request even when the mergeable_state is not clean. Default: false 7 | -------------------------------------------------------------------------------- /.github/scripts/jd_sharecodes.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | IFS="@" 4 | FRUITSHARECODES_ARR=($FRUITSHARECODES) 5 | PETSHARECODES_ARR=($PETSHARECODES) 6 | PLANT_BEAN_SHARECODES_ARR=($PLANT_BEAN_SHARECODES) 7 | JXFACTORY_SHARECODES_ARR=($JXFACTORY_SHARECODES) 8 | DDFACTORY_SHARECODES_ARR=($DDFACTORY_SHARECODES) 9 | DREAM_FACTORY_SHARE_CODES_ARR=($DREAM_FACTORY_SHARE_CODES) 10 | JDZZ_INVITECODES_ARR=($JDZZ_INVITECODES) 11 | JDJOY_SHARECODES_ARR=($JDJOY_SHARECODES) 12 | JDCASH_SHARECODES_ARR=($JDCASH_SHARECODES) 13 | 14 | for sharecode in ${FRUITSHARECODES_ARR[@]} 15 | do 16 | curl 'http://api.turinglabs.net/api/v1/jd/farm/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 17 | done 18 | 19 | for sharecode in ${PETSHARECODES_ARR[@]} 20 | do 21 | curl 'http://api.turinglabs.net/api/v1/jd/pet/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 22 | done 23 | 24 | for sharecode in ${PLANT_BEAN_SHARECODES_ARR[@]} 25 | do 26 | curl 'http://api.turinglabs.net/api/v1/jd/bean/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 27 | done 28 | 29 | for sharecode in ${JXFACTORY_SHARECODES_ARR[@]} 30 | do 31 | curl 'http://api.turinglabs.net/api/v1/jd/jxfactory/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 32 | done 33 | 34 | for sharecode in ${DDFACTORY_SHARECODES_ARR[@]} 35 | do 36 | curl 'http://api.turinglabs.net/api/v1/jd/ddfactory/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 37 | done 38 | 39 | for sharecode in ${DREAM_FACTORY_SHARE_CODES_ARR[@]} 40 | do 41 | curl 'http://api.turinglabs.net/api/v1/jd/ddfactory/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 42 | done 43 | 44 | for sharecode in ${JDZZ_INVITECODES_ARR[@]} 45 | do 46 | curl 'https://code.chiang.fun/api/v1/jd/jdzz/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 47 | done 48 | 49 | for sharecode in ${JDJOY_SHARECODES_ARR[@]} 50 | do 51 | curl 'https://code.chiang.fun/api/v1/jd/jdcrazyjoy/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 52 | done 53 | 54 | 55 | for sharecode in ${JDCASH_SHARECODES_ARR[@]} 56 | do 57 | curl 'https://code.chiang.fun/api/v1/jd/jdcash/create/'${sharecode}'/' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:79.0) Gecko/20100101 Firefox/79.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.5,zh-HK;q=0.3,en;q=0.2' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' 58 | done 59 | 60 | -------------------------------------------------------------------------------- /.github/scripts/set_jd_time.js: -------------------------------------------------------------------------------- 1 | var request = require('request'); 2 | 3 | // 读取环境变量:Day/signHour/signMinute/signSecond 4 | let signHour = (process.env.Hour)?process.env.Hour:0, 5 | signMinute = (process.env.Minute)?process.env.Minute:0, 6 | signSecond = (process.env.Second)?process.env.Second:0, 7 | signMs = (process.env.Millisecond)?process.env.Millisecond:0; 8 | 9 | // 获取today+1的 H:M:S:MS 时间戳 10 | let scheduleTime = new Date(new Date(new Date().setDate(new Date().getDate()+1)).setHours(signHour,signMinute,signSecond,signMs)) 11 | let scheduleTimestamp =scheduleTime.getTime(); 12 | 13 | new Promise((resolve, reject) => { 14 | request({ 15 | url: 'https://a.jd.com//ajax/queryServerData.html', 16 | method: 'get' 17 | }, (err, res, body) => { 18 | if (res && res.statusCode === 200) { 19 | resolve(JSON.parse(body)); 20 | } else { 21 | reject(' error - -'); 22 | } 23 | }); 24 | }).then(result => { 25 | jdServerTimestamp = result.serverTime; 26 | console.log("当前JD服务器时间" + new Date(jdServerTimestamp)); 27 | timeDiff = scheduleTimestamp - jdServerTimestamp; 28 | if (timeDiff>0 && timeDiff< 1*60*60*1000 ) { 29 | console.log("倒计时"+timeDiff/1000+"秒"); 30 | setTimeout(console.log,timeDiff,"已到达设定时间"+scheduleTime+"立即执行!"); 31 | } else if(timeDiff<0) { 32 | console.log("已到达设定时间"+scheduleTime+"立即执行!"); 33 | } else{ 34 | console.log("时间太早了!先执行一遍!"); 35 | } 36 | 37 | }).catch(err => { 38 | console.log("error: " + err) 39 | }) 40 | 41 | -------------------------------------------------------------------------------- /.github/workflows/jd_bean_exchange.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: 京豆兑换 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0,10 15,16 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jd_bean_exchange 15 | jobs: 16 | Build-Nodejs-and-Scripts: 17 | runs-on: ubuntu-latest 18 | if: github.event.repository.owner.id == github.event.sender.id 19 | steps: 20 | - name: 获取 Scripts 21 | run: | 22 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 23 | - name: 获取备份仓库 24 | if: ${{ failure() }} 25 | run: | 26 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 27 | 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v1 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | - name: Cache node_modules 33 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 34 | env: 35 | cache-name: cache-node-modules 36 | with: 37 | path: node_modules 38 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 39 | 40 | - name: '运行 【京豆兑换】' 41 | run: | #0点兑换 42 | cd ~/scripts 43 | npm install 44 | node set_jd_time.js 45 | node jd_blueCoin.js & node jd_car_exchange.js & node jd_joy_reward.js 46 | env: 47 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 48 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 49 | JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长) 50 | JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}} 51 | JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}} 52 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 53 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 54 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 55 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 56 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 57 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 58 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 59 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 60 | MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS }} 61 | MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY }} 62 | JD_JOY_REWARD_NOTIFY: ${{ secrets.JD_JOY_REWARD_NOTIFY }} 63 | JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME }} 64 | -------------------------------------------------------------------------------- /.github/workflows/jd_bean_sign.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: 京豆签到类 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '30 15,0 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: 签到类 15 | jobs: 16 | Build-Nodejs-and-Scripts: 17 | runs-on: ubuntu-latest 18 | if: github.event.repository.owner.id == github.event.sender.id 19 | steps: 20 | - name: 获取 Scripts 21 | run: | 22 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 23 | - name: 获取备份仓库 24 | if: ${{ failure() }} 25 | run: | 26 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 27 | 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v1 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | - name: Cache node_modules 33 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 34 | env: 35 | cache-name: cache-node-modules 36 | with: 37 | path: node_modules 38 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 39 | 40 | - name: '运行 【京豆签到类:】' 41 | run: | # 42 | cd ~/scripts 43 | npm install 44 | node jd_bean_sign.js 45 | node jd_bean_home.js 46 | node jd_bean_change.js 47 | node jd_club_lottery.js 48 | node jd_car.js 49 | node jd_kd.js 50 | node jd_cash.js 51 | node jx_sign.js 52 | node jd_nh.js 53 | node jd_new_shop.js 54 | node jd_immortal.js 55 | node jd_jdzz.js 56 | node jd_baiTiao.js 57 | node jd_paopao.js 58 | env: 59 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 60 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 61 | JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长) 62 | JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}} 63 | JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}} 64 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 65 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 66 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 67 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 68 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 69 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 70 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 71 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 72 | -------------------------------------------------------------------------------- /.github/workflows/jd_blueCoin.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_blueCoin 京小超兑换奖品 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 16 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: blueCoin 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京小超兑换奖品】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_blueCoin.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS }} 44 | MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY }} 45 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 46 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 47 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 48 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 49 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 50 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 51 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 52 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_bookshop.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: 口袋书店 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '1 */4 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: 口袋书店 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【口袋书店】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_bookshop.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | UN_SUBSCRIBES: ${{ secrets.UN_SUBSCRIBES }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 52 | 53 | -------------------------------------------------------------------------------- /.github/workflows/jd_crazy_joy.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_crazy_joy 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 */5 * * *' 11 | # watch: 12 | # types: [started] 13 | repository_dispatch: 14 | types: jd_crazy_joy 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京东赚赚脚本&疯狂的joy】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_crazy_joy.js 40 | node jd_crazy_joy_coin.js 41 | env: 42 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 43 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 44 | JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }} 45 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 46 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 49 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 50 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 51 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 52 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 53 | -------------------------------------------------------------------------------- /.github/workflows/jd_daily_egg.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_daily_egg 天天提鹅 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '10 */3 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jd_daily_egg 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【天天提鹅】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_daily_egg.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }} 52 | -------------------------------------------------------------------------------- /.github/workflows/jd_fruit.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: 东东农场&京喜农场 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '20 */4 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: fruit 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【东东农场&jx_nc.js】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_fruit.js 40 | node jdJxncTokens.js 41 | node jd_jxnc.js 42 | env: 43 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 44 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 45 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 46 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 47 | FRUITSHARECODES: ${{ secrets.FRUITSHARECODES }} 48 | FRUIT_BEAN_CARD: ${{ secrets.FRUIT_BEAN_CARD }} 49 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 50 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 51 | FRUIT_NOTIFY_CONTROL: ${{ secrets.FRUIT_NOTIFY_CONTROL }} 52 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 53 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 54 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 55 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 56 | -------------------------------------------------------------------------------- /.github/workflows/jd_jdfactory.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_jdfactory 东东工厂 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '10 0 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jdfactory 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【东东工厂】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_jdfactory.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | UN_SUBSCRIBES: ${{ secrets.UN_SUBSCRIBES }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 52 | 53 | -------------------------------------------------------------------------------- /.github/workflows/jd_joy.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy 宠汪汪 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 */2 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: joy 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【宠汪汪】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_joy.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }} 44 | JOY_RUN_FLAG: ${{ secrets.JOY_RUN_FLAG }} 45 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 46 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 49 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 50 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 51 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 52 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_joy_feedPets.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_feedPets 宠汪汪喂食脚本 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '*/20 */1 * * *' 11 | # watch: 12 | # types: [started] 13 | repository_dispatch: 14 | types: joy_feedPets 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【宠汪汪喂食脚本】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_joy_feedPets.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 47 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 48 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_joy_reward.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_reward 宠汪汪积分兑换京豆 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 */4 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: joy_reward 15 | jobs: 16 | build: 17 | runs-on: ubuntu-latest 18 | if: github.event.repository.owner.id == github.event.sender.id 19 | steps: 20 | - name: Checkout 21 | run: | 22 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - name: Cache node_modules 28 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 29 | env: 30 | cache-name: cache-node-modules 31 | with: 32 | path: node_modules 33 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 34 | - name: '运行 【宠汪汪积分兑换京豆】' 35 | run: | 36 | cd ~/scripts 37 | npm install 38 | node jd_joy_reward.js 39 | env: 40 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 41 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 42 | JD_JOY_REWARD_NOTIFY: ${{ secrets.JD_JOY_REWARD_NOTIFY }} 43 | JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 47 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 48 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_joy_steal.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_joy_steal 宠汪汪偷好友狗粮与积分 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 */4 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: joy_steal 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【宠汪汪偷好友狗粮与积分】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_joy_steal.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | JOY_HELP_FEED: ${{ secrets.JOY_HELP_FEED }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_live.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_live直播 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '10-20/5 12 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: live_redrain 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【jd_live.js】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_live.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | UN_SUBSCRIBES: ${{ secrets.UN_SUBSCRIBES }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 52 | 53 | -------------------------------------------------------------------------------- /.github/workflows/jd_lotteryMachine.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_lotteryMachine 京东抽奖机 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '11 17 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jd_lotteryMachine 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京东抽奖机】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_lotteryMachine.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | 52 | -------------------------------------------------------------------------------- /.github/workflows/jd_moneyTree.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_moneyTree 京东摇钱树 5 | 6 | on: 7 | push: 8 | schedule: 9 | - cron: '40 */2 * * *' 10 | # watch: 11 | # types: started 12 | repository_dispatch: 13 | types: moneyTree 14 | jobs: 15 | build: 16 | 17 | runs-on: ubuntu-latest 18 | if: github.event.repository.owner.id == github.event.sender.id 19 | steps: 20 | - name: Checkout 21 | run: | 22 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 23 | - name: Use Node.js ${{ matrix.node-version }} 24 | uses: actions/setup-node@v1 25 | with: 26 | node-version: ${{ matrix.node-version }} 27 | - name: Cache node_modules 28 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 29 | env: 30 | cache-name: cache-node-modules 31 | with: 32 | path: node_modules 33 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 34 | - name: '运行 【京东摇钱树】' 35 | run: | 36 | cd ~/scripts 37 | npm install 38 | node jd_moneyTree.js 39 | env: 40 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 41 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 42 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 43 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 44 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 45 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 46 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 47 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 48 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 49 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_necklace.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_necklace 点点券 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '10 */4 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jd_necklace 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【点点券】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_necklace.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }} 52 | -------------------------------------------------------------------------------- /.github/workflows/jd_pet.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: 东东萌宠&京东家庭号 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '35 */3 * * *' 11 | # watch: 12 | # types: [started] 13 | repository_dispatch: 14 | types: pet 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【东东萌宠】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_pet.js 40 | node jd_family.js 41 | env: 42 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 43 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | PETSHARECODES: ${{ secrets.PETSHARECODES }} 47 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 48 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 49 | PET_NOTIFY_CONTROL: ${{ secrets.PET_NOTIFY_CONTROL }} 50 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 51 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 52 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 53 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 54 | -------------------------------------------------------------------------------- /.github/workflows/jd_pigPet.yml: -------------------------------------------------------------------------------- 1 | name: jd_pigPet 京东金融养猪猪脚本 2 | 3 | on: 4 | push: 5 | workflow_dispatch: 6 | schedule: 7 | - cron: '*/20 */1 * * *' 8 | # watch: 9 | # types: [started] 10 | repository_dispatch: 11 | types: pigPet 12 | jobs: 13 | build: 14 | 15 | runs-on: ubuntu-latest 16 | if: github.event.repository.owner.id == github.event.sender.id 17 | steps: 18 | - name: Checkout 19 | run: | 20 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 21 | - name: Use Node.js ${{ matrix.node-version }} 22 | uses: actions/setup-node@v1 23 | with: 24 | node-version: ${{ matrix.node-version }} 25 | - name: Cache node_modules 26 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 27 | env: 28 | cache-name: cache-node-modules 29 | with: 30 | path: node_modules 31 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 32 | - name: '运行 【京东金融养猪猪脚本】' 33 | run: | 34 | cd ~/scripts 35 | npm install 36 | node jd_pigPet.js 37 | env: 38 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 39 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 40 | JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }} 41 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 42 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 43 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 44 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 45 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 46 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 47 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 48 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 49 | -------------------------------------------------------------------------------- /.github/workflows/jd_plantBean.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_plantBean 种豆得豆 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 */1 * * *' #此处为UTC-0时间 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: pantBean 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【种豆得豆】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_plantBean.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | PLANT_BEAN_SHARECODES: ${{ secrets.PLANT_BEAN_SHARECODES }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 52 | -------------------------------------------------------------------------------- /.github/workflows/jd_rankingList.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_rankingList 京东排行榜 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '11 18 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: jd_rankingList 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京东排行榜】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_rankingList.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | 52 | -------------------------------------------------------------------------------- /.github/workflows/jd_redPacket.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_redPacket 全民开红包脚本 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 17 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: redPacket 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【全民开红包脚本】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_redPacket.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 46 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_sharecode.yml: -------------------------------------------------------------------------------- 1 | 2 | name: 打印互助码&互助码自动上车 3 | 4 | on: 5 | push: 6 | workflow_dispatch: 7 | schedule: 8 | - cron: '20 18 * * *' 9 | # watch: 10 | # types: started 11 | repository_dispatch: 12 | types: jd_sharecode 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | if: github.event.repository.owner.id == github.event.sender.id 17 | steps: 18 | - name: Checkout 19 | run: | 20 | git clone https://github.com/lifeishard4me/Actions.git ~/Actions 21 | - name: 提交互助码 22 | run: | 23 | cd ~/Actions/.github/scripts 24 | chmod +x jd_sharecodes.sh 25 | ./jd_sharecodes.sh 26 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 27 | cd ~/scripts 28 | npm install 29 | node jd_get_share_code.js 30 | env: 31 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 32 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 33 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 34 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 35 | PETSHARECODES: ${{ secrets.PETSHARECODES }} 36 | FRUITSHARECODES: ${{ secrets.FRUITSHARECODES }} 37 | PLANT_BEAN_SHARECODES: ${{ secrets.PLANT_BEAN_SHARECODES }} 38 | SUPERMARKET_SHARECODES: ${{ secrets.SUPERMARKET_SHARECODES }} 39 | DDFACTORY_SHARECODES: ${{ secrets.DDFACTORY_SHARECODES }} 40 | JXFACTORY_SHARECODES: ${{ secrets.JXFACTORY_SHARECODES }} 41 | DREAM_FACTORY_SHARE_CODES: ${{ secrets.DREAM_FACTORY_SHARE_CODES }} 42 | JDZZ_INVITECODES: ${{ secrets.JDZZ_INVITECODES }} 43 | JDJOY_SHARECODES: ${{ secrets.JDJOY_SHARECODES }} 44 | JDCASH_SHARECODES: ${{ secrets.JDCASH_SHARECODES }} 45 | 46 | -------------------------------------------------------------------------------- /.github/workflows/jd_shop.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_shop 进店领豆脚本 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 16 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: shop 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【进店领豆脚本】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_shop.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 46 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | -------------------------------------------------------------------------------- /.github/workflows/jd_small_home.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_small_home 东东小窝 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '0 16 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: small_home 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【东东小窝】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_small_home.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长) 44 | JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}} 45 | JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}} 46 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 47 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 48 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 49 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 50 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 51 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 52 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 53 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_speed.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_speed 天天加速 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '33 */2 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: speed 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【天天加速】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_speed.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 46 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_superMarket.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_superMarket 京小超 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '15 * * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: superMarket 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京小超】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_superMarket.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 44 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 45 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 46 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 47 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 48 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 49 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 50 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 51 | SUPERMARKET_UPGRADE: ${{ secrets.SUPERMARKET_UPGRADE }} 52 | jdBusinessCircleJump: ${{ secrets.BUSINESS_CIRCLE_JUMP }} 53 | SUPERMARKET_SHARECODES: ${{ secrets.SUPERMARKET_SHARECODES }} 54 | jdSuperMarketLottery: ${{ secrets.SUPERMARKET_LOTTERY }} 55 | -------------------------------------------------------------------------------- /.github/workflows/jd_syj.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_syj 京豆十元街 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '10 7 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: syj 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京豆十元街】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_syj.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长) 44 | JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}} 45 | JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}} 46 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 47 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 48 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 49 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 50 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 51 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 52 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 53 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} -------------------------------------------------------------------------------- /.github/workflows/jd_unsubscribe.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: jd_unsubscribe 京东取关商品 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '45 15 * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: unsubscribe 15 | jobs: 16 | build: 17 | 18 | runs-on: ubuntu-latest 19 | if: github.event.repository.owner.id == github.event.sender.id 20 | steps: 21 | - name: Checkout 22 | run: | 23 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 24 | - name: Use Node.js ${{ matrix.node-version }} 25 | uses: actions/setup-node@v1 26 | with: 27 | node-version: ${{ matrix.node-version }} 28 | - name: Cache node_modules 29 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 30 | env: 31 | cache-name: cache-node-modules 32 | with: 33 | path: node_modules 34 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 35 | - name: '运行 【京东取关商品】' 36 | run: | 37 | cd ~/scripts 38 | npm install 39 | node jd_unsubscribe.js 40 | env: 41 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 42 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 43 | UN_SUBSCRIBES: ${{ secrets.UN_SUBSCRIBES }} 44 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 45 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 46 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 47 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 48 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 49 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 50 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 51 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 52 | -------------------------------------------------------------------------------- /.github/workflows/shylocks.yml: -------------------------------------------------------------------------------- 1 | # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node 2 | # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions 3 | 4 | name: shylocks 5 | 6 | on: 7 | push: 8 | workflow_dispatch: 9 | schedule: 10 | - cron: '30 * * * *' 11 | # watch: 12 | # types: started 13 | repository_dispatch: 14 | types: shylocks 15 | jobs: 16 | Build-Nodejs-and-Scripts: 17 | runs-on: ubuntu-latest 18 | if: github.event.repository.owner.id == github.event.sender.id 19 | steps: 20 | - name: 获取 Scripts 21 | run: | 22 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 23 | - name: 获取备份仓库 24 | if: ${{ failure() }} 25 | run: | 26 | git clone -b master https://gitlab.com/MrRight/Scripts.git ~/scripts 27 | 28 | - name: Use Node.js ${{ matrix.node-version }} 29 | uses: actions/setup-node@v1 30 | with: 31 | node-version: ${{ matrix.node-version }} 32 | - name: Cache node_modules 33 | uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。 34 | env: 35 | cache-name: cache-node-modules 36 | with: 37 | path: node_modules 38 | key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替 39 | 40 | - name: npm install 41 | run: | # 42 | cd ~/scripts/Loon-main/ 43 | npm install 44 | 45 | - name: 运行 shelocks 脚本 46 | run: | # 47 | cd ~/scripts/Loon-main/ 48 | for js in jd_*.js; 49 | do node $js || true 50 | done 51 | shell: bash 52 | env: 53 | JD_COOKIE: ${{ secrets.JD_COOKIE }} 54 | JD_DEBUG: ${{ secrets.JD_DEBUG }} 55 | JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长) 56 | JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}} 57 | JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}} 58 | PUSH_KEY: ${{ secrets.PUSH_KEY }} 59 | BARK_PUSH: ${{ secrets.BARK_PUSH }} 60 | TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }} 61 | TG_USER_ID: ${{ secrets.TG_USER_ID }} 62 | BARK_SOUND: ${{ secrets.BARK_SOUND }} 63 | DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }} 64 | DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }} 65 | IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }} 66 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules/ 2 | /.idea 3 | /.history 4 | /box.dat 5 | /CookieSet.json 6 | /jdCookie.js 7 | -------------------------------------------------------------------------------- /Env.min.js: -------------------------------------------------------------------------------- 1 | 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)} -------------------------------------------------------------------------------- /Loon/lxk0301_LoonTask.conf: -------------------------------------------------------------------------------- 1 | # Loon软件Task配置 By lxk0301 2 | # GitHub主页(https://github.com/lxk0301/jd_scripts) 3 | # TG讨论组 (https://t.me/JD_fruit_pet) 4 | # TG通知频道 (https://t.me/jdfruit) 5 | # Loon的Task脚本订阅链接: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Loon/lxk0301_LoonTask.conf 6 | # 使用方法:打开APP,顶部的配置 -> 脚本 -> 订阅脚本- > 点击右上角+号 -> 添加url链接 (https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Loon/lxk0301_LoonTask.conf) 7 | 8 | hostname = api.m.jd.com, draw.jdfcloud.com, jdjoy.jd.com, account.huami.com 9 | # 东东农场 10 | cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,tag=东东农场 11 | 12 | # 东东萌宠 13 | cron "10 7-19/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,tag=东东萌宠 14 | 15 | # 京东种豆得豆 16 | cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,tag=京东种豆得豆 17 | 18 | # 宠汪汪(主要是日常任务,不过里面也有喂食和领取三餐狗粮) 19 | cron "15 1,7,9,12,18,21 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js,tag=宠汪汪 20 | 21 | # 宠汪汪喂食 22 | cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js,tag=宠汪汪喂食 23 | 24 | # 宠汪汪偷好友积分与狗粮 25 | cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮 26 | 27 | # 宠汪汪积分兑换奖品 28 | cron "0 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品 29 | 30 | # 京东天天加速 31 | cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js,tag=京东天天加速 32 | 33 | # 京东摇钱树 34 | cron "3 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js,tag=京东摇钱树 35 | 36 | # 京小超 37 | cron "11 1-23/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,tag=京小超 38 | 39 | # 京小超兑换奖品 40 | cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,tag=京小超兑换奖品 41 | 42 | # 取关京东店铺商品 43 | cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品 44 | 45 | # 进店领豆 46 | cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js,tag=进店领豆 47 | 48 | #摇京豆 49 | cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js,tag=摇京豆 50 | 51 | #京东全民开红包 52 | cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, tag=京东全民开红包 53 | 54 | #京豆变动通知 55 | cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, tag=京豆变动通知 56 | 57 | #点点券 58 | cron "20 0,20 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, tag=点点券 59 | 60 | #十元街 61 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, tag=十元街 62 | 63 | #东东小窝 64 | cron "16 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, tag=东东小窝 65 | 66 | #京喜工厂 67 | cron "26 * * * *" script-path= https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂 68 | 69 | #东东工厂 70 | cron "10 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js,tag=东东工厂 71 | 72 | #宠汪汪邀请助力与赛跑助力 73 | cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力 74 | 75 | #小米运动 76 | cron "25 17 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/xmSports.js, tag=小米运动 77 | 78 | #宠汪汪助力更新Token 79 | 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 80 | 81 | #宠汪汪助力获取Token 82 | 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 83 | 84 | # 宠汪汪强制为别人助力 85 | 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=宠汪汪强制为别人助力 86 | 87 | #聚宝盆投狗粮辅助(github@Zero-S1搬的) 88 | 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=聚宝盆投狗粮辅助 89 | 90 | # 小米运动获取Token 91 | 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 92 | 93 | # 京东代属 94 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, tag=京东代属 95 | 96 | # 京东快递 97 | cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, tag=京东快递签到 98 | 99 | # 京东汽车 100 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车 101 | 102 | # 领京豆额外奖励 103 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, tag=领京豆额外奖励 104 | 105 | # 京东健康 106 | cron "3 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js,tag=京东健康 107 | # 京东赚赚 108 | cron "10 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, tag=京东赚赚 109 | # 京东秒杀红包雨 110 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨 111 | 112 | # 京东直播 113 | cron "10-20/5 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, tag=京东直播 114 | # 京东看一看 115 | cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看 116 | #直播红包雨 117 | 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=直播红包雨 118 | # 金融打卡领年终奖 119 | cron "10 6 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=金融打卡领年终奖 120 | # 健康抽奖机 121 | cron "10 0 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js,tag=健康抽奖机 -------------------------------------------------------------------------------- /QuantumultX/3B3B3933-D53E-42BA-842F-2DA525FDEB18.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/QuantumultX/3B3B3933-D53E-42BA-842F-2DA525FDEB18.jpeg -------------------------------------------------------------------------------- /QuantumultX/lxk0301_gallery.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lxk0301 task gallery", 3 | "description": "https://github.com/lxk0301/jd_scripts", 4 | "task": [ 5 | "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", 6 | "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", 7 | "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", 8 | "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", 9 | "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", 10 | "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", 11 | "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", 12 | "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", 13 | "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", 14 | "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", 15 | "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", 16 | "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", 17 | "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", 18 | "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", 19 | "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", 20 | "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", 21 | "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", 22 | "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", 23 | "10 * * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, tag=京喜工厂, img-url=https://github.com/58xinian/icon/raw/master/jdgc.png", 24 | "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", 25 | "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", 26 | "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", 27 | "15 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, tag=秒杀红包雨, img-url=https://raw.githubusercontent.com/Orz-3/task/master/jd.png", 28 | "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", 29 | "20 7 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, tag=京东汽车, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_car.png", 30 | "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", 31 | "30 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", 32 | "30 0 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, tag=健康抽奖机, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", 33 | "40 9,10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, tag=京东看一看, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jd_watch.png", 34 | "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", 35 | "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", 36 | "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", 37 | "1 0,20,9-23/2 15-31 12 * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, tag=直播红包雨, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_live_redrain.png", 38 | "10 12 1-31 12 * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, tag=京东金融打卡, img-url= https://raw.githubusercontent.com/58xinian/icon/master/jd_redPacket.png", 39 | "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" 40 | ] 41 | } 42 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 不要fork! 不然下次GitHub还会继续封这个仓库 2 | 3 | ## 特别声明: 4 | 5 | * 本仓库发布的Script项目中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断. 6 | 7 | * 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。 8 | 9 | * lxk0301对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害. 10 | 11 | * 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, lxk0301 对于由此引起的任何隐私泄漏或其他后果概不负责. 12 | 13 | * 请勿将Script项目的任何内容用于商业或非法目的,否则后果自负. 14 | 15 | * 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本. 16 | 17 | * 任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。lxk0301 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明. 18 | 19 | **您必须在下载后的24小时内从计算机或手机中完全删除以上内容.**
20 | > ***您使用或者复制了本仓库且本人制作的任何脚本,则视为`已接受`此声明,请仔细阅读*** 21 | 22 | ## Script脚本列表 23 | 24 | 1. 京东水果([jd_fruit.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js)) 25 | 2. 东东萌宠([jd_pet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js)) 26 | 4. 种豆得豆([jd_plantBean.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js)) 27 | 5. 天天加速([jd_speed.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js)) 28 | 6. 摇钱树([jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js)) 29 | 6. 宠汪汪([jd_joy.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy.js)) 30 | 7. 宠汪汪偷好友狗粮与积分([jd_joy_steal.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js)) 31 | 8. 宠汪汪单独喂食([jd_joy_feedPets.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js)) 32 | 9. 宠汪汪兑换奖品([jd_joy_reward.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_reward.js)) 33 | 10. 宠汪汪强制为好友助力(刷好友)([jd_joy_help.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js)) 34 | 11. 宠汪汪赛跑助力([jd_joy_run.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js)) 35 | 12. 宠汪汪聚宝盆辅助脚本([jd_petTreasureBox.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_petTreasureBox.js)) 36 | 13. 取关京东店铺和商品([jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js)) 37 | 14. 东东超市([jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js)) 38 | 15. 东东超市兑换奖品([jd_blueCoin.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js)) 39 | 16. 进店领豆([jd_shop.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js)) 40 | 17. 摇京豆([jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js)) 41 | 18. 全名开红包([jd_redPacket.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js)) 42 | 19. 京东多合一签到([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) 】 43 | 20. 京豆变动通知([jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js)) 44 | 21. 京喜工厂([jd_dreamFactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js)) 45 | 22. 东东小窝([jd_small_home.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js)) 46 | 23. 东东工厂([jd_jdfactory.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js)) 47 | 24. 点点券([jd_necklace.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js)) 48 | 25. 十元街([jd_syj.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js)) 49 | 26. 京东金融-天天提鹅([jd_daily_egg.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_daily_egg.js)) 50 | 27. 京东金融-养猪猪([jd_pigPet.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pigPet.js)) 51 | 28. 以及其他一部分在特定时间可用的薅京豆脚本:[手机狂欢城](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_818.js) 、[星推官](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_xtg.js) 、[双十一活动领金币](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_collectProduceScore.js) 、[热8超级盲盒](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_mohe.js) 52 | 29. Webhook触发Action([webhook.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/webhook.js)) 53 | 54 | 搬运脚本 55 | 1. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东抽奖机([jd_lotteryMachine.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_lotteryMachine.js)) 56 | 2. 【[@yangtingxiao](https://github.com/yangtingxiao)】京东排行榜([jd_rankingList.js](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_rankingList.js)) 57 | 58 | **脚本兼容: [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** 59 | 60 | **TODO** 61 | 62 | - [ ] 东东工厂相互助力 63 | - [ ] 京喜工厂相互助力 64 | 65 | ## 食用方法 66 | 67 | ### 方法一:本地安装Node.js,下载本库脚本 68 | 69 | - 教程请见:[EvineDeng/jd-base](https://github.com/EvineDeng/jd-base),适用于以下系统: 70 | 71 | 1. Armbian/OpenWrt/Debian/Ubuntu/CentOS/Fedora/RedHat等Linux系统 72 | 73 | 2. Android 74 | 75 | 3. MacOS 76 | 77 | ### 方法二:云服务器、腾讯云函数等等 78 | 79 | - 需自行有云服务器,云函数等 80 | - 腾讯云云函数 [快速部署教程](tencentscf.md)(免费) 81 | - 腾讯云云函数控制台使用 [教程说明](iCloud.md) 82 | - 腾讯云云函数 [GitHub Action部署教程](tencentscf.md#github-action-部署) 83 | 84 | 85 | ### 方法三:Docker(NAS或VPS用户) 86 | 87 | - 可以精确控制任务运行时间,有二种办法:[docker办法一](https://github.com/lxk0301/jd_scripts/tree/master/docker)、[docker办法二(和本地安装Node.js类似)](https://github.com/EvineDeng/jd-base) 88 | - [环境变量](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) 89 | 90 | #### 注:以上三种运行机制都是Node.js,故您需仔细阅读下面几点 91 | 92 | 93 | - 如果使用方法一与方法二,需自行提供京东cookie填写到 [jdCookie.js](https://github.com/lxk0301/jd_scripts/blob/master/jdCookie.js) 里面 94 | 95 | 96 | - 获取京东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) 97 | 98 | - 方法三Docker安装Cookie请见各自的说明。 99 | 100 | ### 方法四:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭) 101 | 102 | #### 以下内容只针对iOS用户 103 | 104 | #### ios使用多个京东账号,需要使用BoxJs保存多会话进行切换 105 | 106 | ##### BoxJs简单说明可看作者[BoxJs仓库地址](https://github.com/chavyleung/scripts/) 107 | 108 | 使用box可以实现远程订阅助力好友(需订阅此 [链接](https://raw.githubusercontent.com/lxk0301/jd_scripts/master/lxk0301.boxjs.json)) 109 | 110 | - [BoxJs使用教程](https://chavyleung.gitbook.io/boxjs/) 111 | 112 | - [BoxJs教程视频](https://youtu.be/eIpBrRxiy0w) 113 | 114 | 115 | 【用box订阅的好处】 116 | 117 | 1、脚本也可以远程挂载。京东活动助力功能的分享码只需在box里面填写。以后只需远程更新就行。 118 | 119 | 2、所有脚本的cookie都可以备份,方便你迁移到其他支持box的软件。 120 | 121 | 3、box可以支持多账号 122 | 123 | ### 赞赏码(开发维护不易,请赏杯茶水费) 124 |
125 | 126 | ### 特别感谢(排名不分先后): 127 | * [@NobyDa](https://github.com/NobyDa) 128 | 129 | * [@chavyleung](https://github.com/chavyleung) 130 | 131 | * [@liuxiaoyucc](https://github.com/liuxiaoyucc) 132 | 133 | * [@Zero-S1](https://github.com/Zero-S1) 134 | 135 | * [@uniqueque](https://github.com/uniqueque) 136 | 137 | 138 | * [@nzw9314](https://github.com/nzw9314) 139 | -------------------------------------------------------------------------------- /Surge/lxk0301_Task.sgmodule.sgmodule: -------------------------------------------------------------------------------- 1 | #!name=lxk0301 iOS Tasks Module 2 | #!desc=iOS Tasks 模块配置 3 | #!system=ios 4 | 5 | # Task模块配置 By lxk0301 6 | # GitHub主页(https://github.com/lxk0301/jd_scripts) 7 | # TG讨论组 (https://t.me/JD_fruit_pet) 8 | # TG通知频道 (https://t.me/jdfruit) 9 | # Surge的Task脚本模块地址: https://raw.githubusercontent.com/lxk0301/jd_scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule 10 | 11 | [Script] 12 | #东东农场 13 | cron "40 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_fruit.js,timeout=530, wake-system=1, tag=东东农场 14 | #东东萌宠 15 | cron "20 8-18/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠 16 | #京东种豆得豆 17 | cron "50 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_plantBean.js,timeout=630, wake-system=1, tag=京东种豆得豆 18 | #宠汪汪 19 | 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=宠汪汪 20 | #宠汪汪喂食(仅喂食) 21 | cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_feedPets.js,timeout=30, wake-system=1, tag=宠汪汪喂食 22 | #宠汪汪偷好友积分与狗粮 23 | cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_steal.js,timeout=1420, wake-system=1, tag=宠汪汪偷好友积分与狗粮 24 | #宠汪汪积分兑换奖品 25 | 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=宠汪汪积分兑换奖品 26 | #京东天天加速 27 | cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_speed.js,timeout=130, wake-system=1, tag=京东天天加速 28 | #京东摇钱树 29 | cron "15 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_moneyTree.js,timeout=130, wake-system=1, tag=京东摇钱树 30 | #摇京豆 31 | cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_club_lottery.js, timeout=1150, wake-system=1, tag=摇京豆 32 | #京小超 33 | cron "11 1-23/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_superMarket.js,timeout=530, wake-system=1, tag=京小超 34 | 京小超兑换奖品 35 | cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_blueCoin.js,timeout=130, wake-system=1, tag=京小超兑换奖品 36 | #取关京东店铺商品 37 | cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_unsubscribe.js,timeout=250, wake-system=1, tag=取关京东店铺商品 38 | #进店领豆 39 | cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_shop.js,timeout=130, wake-system=1, tag=进店领豆 40 | #宠汪汪邀请助力与赛跑助力 41 | cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, timeout=230, wake-system=1, tag=宠汪汪邀请助力与赛跑助力 42 | #京东全民开红包 43 | cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_redPacket.js, wake-system=1, tag=京东全民开红包 44 | #京豆变动通知 45 | cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_change.js, timeout=650, wake-system=1, tag=京豆变动通知 46 | #点点券 47 | cron "30 0,20 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_necklace.js, timeout=650, wake-system=1, tag=点点券 48 | #京喜工厂 49 | cron "24 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_dreamFactory.js, timeout=650, wake-system=1, tag=京喜工厂 50 | #东东工厂 51 | cron "40 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdfactory.js, timeout=650, wake-system=1, tag=东东工厂 52 | #东东小窝 53 | cron "10 7 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_small_home.js, timeout=650, wake-system=1, tag=东东小窝 54 | #十元街 55 | cron "40 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_syj.js, timeout=650, wake-system=1, tag=十元街 56 | #京东代属(仅京东学生认证用户可用) 57 | cron "30 8 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ds.js, timeout=650, wake-system=1, tag=京东代属 58 | #领京豆额外奖励 59 | cron "30 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_bean_home.js, timeout=750, wake-system=1, tag=领京豆额外奖励 60 | #京东汽车 61 | cron "30 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_car.js, timeout=750, wake-system=1, tag=京东汽车 62 | #京东快递签到 63 | cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_kd.js, timeout=750, wake-system=1, tag=京东快递签到 64 | #京东直播(活动结束时间未知) 65 | cron "20 12 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live.js, timeout=750, wake-system=1, tag=京东直播 66 | #京东看一看 67 | cron "40 9,10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_watch.js, timeout=7750, wake-system=1, tag=京东看一看 68 | #京东健康 69 | cron "20 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdh.js, timeout=750, wake-system=1, tag=京东健康 70 | #京东赚赚 71 | cron "20 11 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_jdzz.js, timeout=750, wake-system=1, tag=京东赚赚 72 | #以下为短期活动 73 | #金融打卡领年终奖 74 | cron "30 7 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jr_sign.js, timeout=750, wake-system=1, tag=金融打卡领年终奖 75 | #健康抽奖机 76 | cron "30 2 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_health.js, timeout=750, wake-system=1, tag=健康抽奖机 77 | #直播红包雨(2020-12-31活动结束) 78 | cron "1 0,20,9-23/2 15-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_live_redrain.js, timeout=750, wake-system=1, tag=直播红包雨 79 | #秒杀红包雨(2020-12-31活动结束) 80 | cron "20 9 1-31 12 *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_ms_redrain.js, timeout=750, wake-system=1, tag=秒杀红包雨 81 | 82 | -------------------------------------------------------------------------------- /backUp/AlipayManor.js: -------------------------------------------------------------------------------- 1 | // qx 及 loon 可用。 2 | // 半自动提醒支付宝蚂蚁庄园喂食。 3 | // 15 */4 * * * AlipayManor.js 4 | // 自用 Modified from zZPiglet 5 | 6 | const $ = new Env('蚂蚁庄园'); 7 | const manor = "alipays://platformapi/startapp?appId=66666674"; 8 | 9 | $.msg("支付宝", "蚂蚁庄园喂食啦", "alipays://platformapi/startapp?appId=66666674", manor); 10 | 11 | $.done() 12 | 13 | // prettier-ignore 14 | 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)} -------------------------------------------------------------------------------- /backUp/GetJdCookie.md: -------------------------------------------------------------------------------- 1 | ## 浏览器获取京东cookie教程 2 | 3 | **以下浏览器都行** 4 | 5 | - Chrome浏览器 6 | - 新版Edge浏览器 7 | - 国产360,QQ浏览器切换到极速模式 8 | 9 | ### 操作步骤 10 | 11 | 1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/) 12 | 2. 按键盘F12键打开开发者工具,然后点下图中的图标 13 | ![切换到手机模式](../icon/jd1.jpg) 14 | 3. 此时是未登录状态(使用手机短信验证码登录),如已登录请忽略此步骤 15 | - 使用手机短信验证码登录(此方式cookie有效时长大概31天,其他登录方式比较短) 16 | 4. 登录后,选择Network,有很多链接的话点箭头这里清空下 17 | ![清空](../icon/jd2.jpg) 18 | 5. 然后再点我的,链接就变少了 19 | ![再次点击我的](../icon/jd3.jpg) 20 | 6. 点第一个链接(log.gif)进去,找到cookie,复制出来,新建一个TXT文本临时保存一下,下面需要用到 21 | ![寻找log.gi](../icon/jd4.jpg) 22 | 7. 第六步复制出来的cookie比较长,我们只需要`pt_pin=xxxx;`和 `pt_key=xxxx;`部分的内容即可(注:英文引号`;`是必要的)。可以用下面的脚本,在Chrome浏览器按F12,console里面输入下面脚本按enter回车键 23 | ``` 24 | var CV = '单引号里面放第六步拿到的cookie'; 25 | var CookieValue = CV.match(/pt_pin=.+?;/) + CV.match(/pt_key=.+?;/); 26 | copy(CookieValue); 27 | ``` 28 | 8. 这样子整理出关键的的cookie已经在你的剪贴板上, 可直接粘贴 29 | 30 | 9. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可 31 | 32 | 33 | -------------------------------------------------------------------------------- /backUp/GetJdCookie2.md: -------------------------------------------------------------------------------- 1 | ## 浏览器插件获取京东cookie教程 2 | > 此教程内容由tg用户@wukongdada提供,特此感谢 3 | 4 | **以下浏览器都行** 5 | 6 | - Chrome浏览器 7 | - 新版Edge浏览器(chrome内核) 8 | 9 | ### 操作步骤 10 | 11 | 1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/) 12 | 2. Chrome类浏览器安装EditThisCookie插件 13 | - Chrome插件商店搜EditThisCookie, 或者[打开此网站](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?utm_source=chrome-ntp-icon) 进行安装 14 | - 仅使用百分浏览器,谷歌浏览器测试过,其他谷歌类浏览器请自行测试。 15 | - 无法登录Chrome插件商店或者打不开网址建议使用edge chrome版。 16 | 3. edge chrome浏览器安装Cookie Editor插件 17 | - [edge插件商店](edge://extensions/)搜Cookie Editor,或[打开以下网址](https://microsoftedge.microsoft.com/addons/detail/cookie-editor/ajfboaconbpkglpfanbmlfgojgndmhmc?hl=zh-CN) 完成插件安装 18 | 4. 以下是chrome和edge的相关设置截图,输入的网址是 ``jd.com`` 19 | 20 | ![Chrome浏览器相关设置](../icon/jd5.png) 21 | 22 | ![Edge浏览器相关设置](../icon/jd6.png) 23 | 24 | 5. 现在点击回到京东触屏版,再点击EditThisCookie/Cookie Editor,再点击搜索,输入key或pin,如下图所示的pt_key,复制pt_key的value值。此插件可以看到cookie的有效期。 25 | 26 | ![插件显示](../icon/jd7.png) 27 | 28 | 6. 按照以下格式形成自己的jd_cookie 29 | - `pt_key=复制插件搜索出来的key值;pt_pin=复制插件搜索出来的pin值;` ,后面的英文引号`;`是必须要的 30 | - 给一个京东cookie具体示例 `pt_key=jdDC2F833333EFDGTCE5BD4AD1A952D4F4DF84A46052;pt_pin=jd_123456;` 31 | 32 | 7. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可 33 | 34 | 35 | -------------------------------------------------------------------------------- /backUp/TG_PUSH.md: -------------------------------------------------------------------------------- 1 | **TG_PUSH教程** 2 | 3 | 利用Telegram机器人推送通知,需要在环境变量填入正确的```TG_BOT_TOKEN```以及```TG_USER_ID```,以下教程简明阐述如何获取token以及UserID 4 | 5 | Ⅰ.首先在Telegram上搜索[BotFather](https://t.me/BotFather)机器人
6 | 7 | ![TG_PUSH1](../icon/TG_PUSH1.png) 8 | 9 | Ⅱ.利用[BotFather](https://t.me/BotFather)创建一个属于自己的通知机器人,按照下图中的1、2、3步骤拿到token,格式形如```10xxx4:AAFcqxxxxgER5uw```。填入```TG_BOT_TOKEN```
10 | 11 | ![TG_PUSH2](../icon/TG_PUSH2.png)
12 | 13 | **新创建的机器人需要跟它发一条消息来开启对话,否则可能会遇到secret填对了但是收不到消息的情况**
14 | 15 | Ⅲ.再次在Telegram上搜索[getuserIDbot](https://t.me/getuserIDbot)机器人,获取UserID。填入```TG_USER_ID```
16 | 17 | ![TG_PUSH3](../icon/TG_PUSH3.png) 18 | 19 | 至此,获取**TG_BOT_TOKEN**以及**TG_USER_ID**的教程结束 20 | -------------------------------------------------------------------------------- /backUp/gitSync.md: -------------------------------------------------------------------------------- 1 | ## 保持自己github的forks自动和上游仓库同步的教程 2 | - 信息来源于 [https://github.com/wei/pull](https://github.com/wei/pull) 3 | - 以下教程仅是出于个人爱好,不保证本教程的完全正确性,最终请以作者 [https://github.com/wei/pull](https://github.com/wei/pull) 的描述为准。 4 | - 注:此教程由telegram用户@wukongdada提供 5 | ### 1、只同步默认分支的教程 6 | 7 | > 当上游的仓库仅有一个默认分支。或者上游仓库有两个分支,我们仅需要同步他的默认分支,其他分支对内容对我们来说无关紧要。 8 | 9 | 10 | 11 | ![git1.jpg](../icon/git1.jpg) 12 | 13 | 14 | 15 | a) 登录自己的github账号,另开网页打开 [https://github.com/wei/pull](https://github.com/wei/pull) 16 | 17 | 18 | 19 | b) 点击Pull app进行安装。 20 | 21 | ![../icon/git2.jpg](../icon/git2.jpg) 22 | 23 | 24 | 25 | c) 安装过程中会让你选择要选择那一种方式,All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),根据自己需求选择,实在不知道怎么选择,就选All repositories;点击install,完成安装。 26 | 27 | ![../icon/git3.jpg](../icon/git3.jpg) 28 | 29 | 30 | 31 | d) 后续,如果要调整1.c中的选项,打开 [https://github.com/apps/pull](https://github.com/apps/pull) ,点击Configure,输入github密码进入pull的相关设置。 32 | 33 | ![../icon/git4.jpg](../icon/git4.jpg) 34 | 35 | 36 | 37 | e) 进入后,找到Repository access,根据自己的需求,重新选择:All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),Save后保存生效。 38 | 39 | ![../icon/git5.jpg](../icon/git5.jpg) 40 | 41 | 42 | 43 | f) Pull app作者虽然在项目中写道keeps your forks up-to-date with upstream via automated pull requests,但当上游仓库有更改时,自己的仓库会在3个小时内完成与上游的同步,3个小时是Pull app作者说的最长时间。当然也可以通过手动触发同步上游仓库,手动触发方式:`https://pull.git.ci/process/你的GitHub名字/你的仓库名字` (例如:`https://pull.git.ci/process/xxxxx/test` ),手动触发可能会进行人机验证,验证通过后会显示Success。 44 | 45 | ![../icon/git12.jpg](../icon/git6.jpg) 46 | 47 | ![../icon/git13.jpg](../icon/git7.png) 48 | 49 | ### 2、同步其他分支的教程 50 | 51 | ![../icon/git8.jpg](../icon/git8.jpg) 52 | 53 | 54 | 55 | a) 假设你fork了上游仓库后,你fork后的地址为 `https://github.com/你的仓库名字/test` ,首先设置完成第1部分内容,注意在1.c步骤没有设置全部同步的,要回到1.e步,确认是否设置同步了 `你的仓库名字/test`,如果没有,请添加上。 56 | 57 | ![../icon/git9.jpg](../icon/git9.jpg) 58 | 59 | 60 | 61 | b) 在默认分支下添加一个文件。 62 | 63 | ![../icon/git10.jpg](../icon/git10.jpg) 64 | 65 | 66 | 67 | c) 复制 ``.github/pull.yml`` 粘贴后看到以下页面,注意github前面的那个.别漏掉了。 68 | 69 | ![../icon/git11.jpg](../icon/git11.jpg) 70 | 71 | 72 | 73 | d) 请在https://github.com/wei/pull\#advanced-setup-with-config 页复制代码, 74 | 75 | 注意:upstream处要修改为上游仓库作者名字。 76 | 77 | ![../icon/git12.jpg](../icon/git12.jpg) 78 | 79 | ![../icon/git13.jpg](../icon/git13.jpg) 80 | 81 | 82 | 83 | e) 最终的示例如下,假设上游作者是zhangsan,所有的注意点都用红线圈出来了,保存后生效。 84 | 85 | ![../icon/git14.jpg](../icon/git14.jpg) 86 | 87 | 88 | 89 | f) Pull app作者虽然在项目中写道keeps your forks up-to-date with upstream via automated pull requests,但当上游仓库有更改时,自己的仓库会在3个小时内完成与上游的同步,3个小时是Pull app作者说的最长时间。当然也可以通过手动触发同步上游仓库,手动触发方式:`https://pull.git.ci/process/你的GitHub名字/你的仓库名字` (例如:`https://pull.git.ci/process/xxxxx/test`),手动触发可能会进行人机验证,验证通过后会显示Success。具体见1.f提供的图片。 90 | 91 | 92 | 93 | g) 本人仅测试过forks一个仓库只有2个分支的项目,如果有多个分支,不能保证是否可行,请自行测试,或者是使用本教程第3部分高级玩法。 94 | 95 | ### 高级玩法 96 | 97 | >当然,作者还有其他更好的项目用于同步所有分支,例如使用 GitHub actions 进行同步。请参考原作者的项目 98 | 99 | - [https://github.com/wei/git-sync](https://github.com/wei/git-sync) 100 | - [https://github.com/repo-sync/github-sync](https://github.com/repo-sync/github-sync) 101 | -------------------------------------------------------------------------------- /backUp/iepngs.boxjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "iepngs.app.sub", 3 | "name": "iepngs脚本订阅(自用,非作者本人的订阅)", 4 | "author": "@iepngs", 5 | "icon": "https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4", 6 | "repo": "https://github.com/iepngs/Script", 7 | "apps": [ 8 | { 9 | "id": "lxhealth", 10 | "name": "乐心健康", 11 | "keys": [ 12 | "lxhealthCookie", 13 | "lxhealthStep" 14 | ], 15 | "settings": [ 16 | { 17 | "id": "lxhealthStep", 18 | "name": "运动步数", 19 | "val": "", 20 | "type": "text", 21 | "desc": "修改乐心健康运动步数" 22 | } 23 | ], 24 | "author": "@iepngs", 25 | "repo": "https://github.com/iepngs/Script", 26 | "script": "https://raw.githubusercontent.com/iepngs/Script/master/lxhealth/index.js", 27 | "icons": [ 28 | "https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4", 29 | "https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4" 30 | ] 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /backUp/jd_Goods.js: -------------------------------------------------------------------------------- 1 | // 半自动提醒心愿单50京豆。 2 | // 15 */4 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/backUp/jd_Goods.js 3 | 4 | const $ = new Env('心愿单50京豆'); 5 | 6 | $.msg($.name, "领50京豆啦", "https://h5.m.jd.com/babelDiy/Zeus/3mTNcpWt5JYh3aUCyo6gqKuF4pnx/index.html", {"open-url": "openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3mTNcpWt5JYh3aUCyo6gqKuF4pnx/index.html%22%20%7D"}); 7 | 8 | $.done(); 9 | 10 | // prettier-ignore 11 | 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)} -------------------------------------------------------------------------------- /backUp/mySelf.boxjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "lxk0301.app.sub2", 3 | "name": "自用", 4 | "author": "@lxk0301", 5 | "icon": "https://avatars0.githubusercontent.com/u/21308593?s=52&v=4", 6 | "repo": "https://github.com/lxk0301/jd_scripts/", 7 | "apps": [ 8 | { 9 | "id": "QQ_READ", 10 | "name": "企鹅阅读(QQ小程序)", 11 | "keys": [ 12 | "qqreadbodyVal", 13 | "qqreadtimeurl", 14 | "qqreadtimehd" 15 | ], 16 | "settings": [], 17 | "author": "@ziye12", 18 | "repo": "https://github.com/ziye12/JavaScript ", 19 | "icons": [ 20 | "https://raw.githubusercontent.com/Orz-3/mini/master/jd.png", 21 | "https://raw.githubusercontent.com/Orz-3/task/master/jd.png" 22 | ] 23 | } 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | LABEL AUTHOR="Akira " \ 3 | VERSION=0.1.2 \ 4 | UPDATE_CONTENT="更新内容较多,重新阅读仓库[Readme](https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" 5 | 6 | RUN set -ex \ 7 | && apk update && apk upgrade\ 8 | && apk add --no-cache tzdata moreutils git nodejs npm curl jq\ 9 | && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 10 | && echo "Asia/Shanghai" > /etc/timezone 11 | 12 | RUN git clone https://github.com/lxk0301/jd_scripts /scripts \ 13 | && cd /scripts \ 14 | && git checkout master \ 15 | && mkdir logs \ 16 | && npm install \ 17 | && cd /tmp \ 18 | && npm install request 19 | 20 | ENV BUILD_VERSION=0.1.2 \ 21 | DEFAULT_LIST_FILE=crontab_list.sh \ 22 | CUSTOM_LIST_MERGE_TYPE=append 23 | 24 | # github action 构建 25 | COPY ./docker/docker_entrypoint.sh /usr/local/bin 26 | # 本地构建 27 | # COPY ./docker_entrypoint.sh /usr/local/bin 28 | RUN chmod +x /usr/local/bin/docker_entrypoint.sh 29 | 30 | WORKDIR /scripts 31 | 32 | ENTRYPOINT ["docker_entrypoint.sh"] 33 | -------------------------------------------------------------------------------- /docker/Readme.md: -------------------------------------------------------------------------------- 1 | ### Usage 2 | > 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式 3 | 4 | - `docker-compose` 安装(群晖nas docker自带安装了docker-compose) 5 | ``` 6 | sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose 7 | sudo chmod +x /usr/local/bin/docker-compose 8 | ``` 9 | ### 如果需要使用 docker 多个账户独立并发执行定时任务,[参考这里](https://github.com/iouAkira/scripts/blob/patch-1/docker/docker%E5%A4%9A%E8%B4%A6%E6%88%B7%E4%BD%BF%E7%94%A8%E7%8B%AC%E7%AB%8B%E5%AE%B9%E5%99%A8%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E.md#%E4%BD%BF%E7%94%A8%E6%AD%A4%E6%96%B9%E5%BC%8F%E8%AF%B7%E5%85%88%E7%90%86%E8%A7%A3%E5%AD%A6%E4%BC%9A%E4%BD%BF%E7%94%A8docker%E5%8A%9E%E6%B3%95%E4%B8%80%E7%9A%84%E4%BD%BF%E7%94%A8%E6%96%B9%E5%BC%8F) 10 | 11 | ⚠️⚠️⚠️2020-12-11更新镜像启动方式,虽然兼容旧版的运行启动方式,但是强烈建议更新镜像和配置后使用 12 | - 更新后`command:`指令配置不再需要 13 | - 更新后可以使用自定义任务文件追加在默任务文件之后,比以前的完全覆盖多一个选择 14 | - - 新的自定两个环境变量为 `CUSTOM_LIST_MERGE_TYPE`:自定文件的生效方式可选值为`append`,`overwrite`默认为`append` ; `CUSTOM_LIST_FILE`: 自定义文件的名字 15 | - 更新镜像增减镜像更新通知,以后镜像如果更新之后,会通知用户更新 16 | 17 | > 注⚠️:前提先理解学会使用这下面的教程 18 | ### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可 19 | 需要新建的目录文件结构参考如下: 20 | ``` 21 | jd_scripts 22 | ├── logs 23 | │   ├── XXXX.log 24 | │   └── XXXX.log 25 | ├── my_crontab_list.sh 26 | └── docker-compose.yml 27 | ``` 28 | - `jd_scripts/logs`建一个空文件夹就行 29 | - `jd_scripts/docker-compose.yml` 参考内容如下(自己动手能力不行搞不定请使用默认配置): 30 | - - [使用默认配置用这个](./example/default.yml) 31 | - - [使用自定义任务追加到默认任务之后用这个](./example/custom-append.yml) 32 | - - [使用自定义任务覆盖默认任务用这个](./example/custom-overwrite.yml) 33 | - - [一次启动多容器并发用这个](./example/multi.yml) 34 | - - [使用群晖默认配置用这个](./example/jd_scripts.syno.json) 35 | - - [使用群晖自定义任务追加到默认任务之后用这个](./example/jd_scripts.custom-append.syno.json) 36 | - - [使用群晖自定义任务覆盖默认任务用这个](./example/jd_scripts.custom-overwrite.syno.json) 37 | - `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) 38 | 39 | 40 | - `jd_scripts/my_crontab_list.sh` 参考内容如下,自己根据需要调整增加删除,不熟悉用户推荐使用默认配置: 41 | 42 | ```shell 43 | 0 */1 * * * git -C /scripts/ pull |ts >> /scripts/logs/pull.log 2>&1 44 | 2 0 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 45 | 2 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 46 | 2 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 47 | 20 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 48 | */20 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 49 | 0 0,4,8,16 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1 50 | 0 1,6 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1 51 | 0 0,1,4,10,15,16 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 52 | 40 */3 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 53 | 35 23,4,10 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 54 | 0 23,0-13/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 55 | 2 0 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1 56 | 3 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 57 | 15 * * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 58 | 55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 59 | ``` 60 | > 定时任务命之后,也就是 `>>` 符号之前加上 `|ts` 可在日志每一行前面显示时间,如下图: 61 | > ![image](https://user-images.githubusercontent.com/6993269/99031839-09e04b00-25b3-11eb-8e47-0b6515a282bb.png) 62 | - 目录文件配置好之后在 `jd_scripts`目录执行。 63 | `docker-compose up -d` 启动(修改docker-compose.yml后需要使用此命令使更改生效); 64 | `docker-compose logs` 打印日志; 65 | `docker-compose pull` 更新镜像; 66 | `docker-compose stop` 停止容器; 67 | `docker-compose restart` 重启容器; 68 | `docker-compose down` 停止并删除容器; 69 | 70 | - 如果是群晖用户,在docker注册表搜jd_scripts,双击下载映像。 71 | 不需要docker-compose.yml,只需建个logs/目录,调整`jd_scripts.syno.json`里面对应的配置值,然后导入json配置新建容器。 72 | 若要自定义my_crontab_list.sh,再建个my_crontab_list.sh文件,配置参考`jd_scripts.my_crontab_list.syno.json`。 73 | ![image](https://user-images.githubusercontent.com/6993269/99024743-32ac1480-25a2-11eb-8c0f-3cb3be90d54c.png) 74 | 75 | ![image](https://user-images.githubusercontent.com/6993269/99024803-4ce5f280-25a2-11eb-9693-60e8910c182c.png) 76 | 77 | ![image](https://user-images.githubusercontent.com/6993269/99024832-6424e000-25a2-11eb-8e31-287771f42ad2.png) 78 | 79 | -------------------------------------------------------------------------------- /docker/crontab_list.sh: -------------------------------------------------------------------------------- 1 | #必须要的默认定时任务请勿删除 2 | 52 */1 * * * sh /scripts/docker/default_task.sh >> /scripts/logs/default_task.log 2>&1 3 | # 每3天的23:50分清理一次日志 4 | 50 23 */3 * * rm -rf /scripts/logs/*.log 5 | 6 | ##############短期活动############## 7 | # 秒杀红包雨(2020.12.31活动过期) 8 | 40 8 1-31 12 * node /scripts/jd_ms_redrain.js >> /scripts/logs/jd_ms_redrain.log 2>&1 9 | # 健康抽奖机(2020.12.31活动过期) 10 | 10 0 1-31 12 * node /scripts/jd_health.js >> /scripts/logs/jd_health.log 2>&1 11 | # 直播红包雨(2020.12.31活动过期) 12 | 1 0,20,9-23/2 15-31 12 * node /scripts/jd_live_redrain.js >> /scripts/logs/jd_live_redrain.log 2>&1 13 | # 京东金融打卡领年终奖(2020.12.31活动过期) 14 | 10 6 1-31 12 * node /scripts/jr_sign.js >> /scripts/logs/jr_sign.log 2>&1 15 | # 京东健康APP集汪汪卡瓜分百万红包(2021.1.6活动过期) 16 | 10 8 * * * node /scripts/jd_jdh.js >> /scripts/logs/jd_jdh.log 2>&1 17 | 18 | ##############长期活动############## 19 | # 签到 20 | 0 0,12,18 * * * cd /scripts && node jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1 21 | # 京小超兑换奖品 22 | 0 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1 23 | # 摇京豆 24 | 0 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1 25 | # 东东农场 26 | 5 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1 27 | # 宠汪汪 28 | 15 */2 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1 29 | # 宠汪汪喂食 30 | 15 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1 31 | # 宠汪汪积分兑换奖品 32 | 0 0-16/8 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1 33 | # 宠汪汪偷好友积分与狗粮 34 | 0 0,6 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1 35 | # 摇钱树 36 | 0 */2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1 37 | # 东东萌宠 38 | 5 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1 39 | # 京东种豆得豆 40 | 0 7-22/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1 41 | # 京东全民开红包 42 | 1 1 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1 43 | # 进店领豆 44 | 10 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1 45 | # 京东天天加速 46 | 8 */3 * * * node /scripts/jd_speed.js >> /scripts/logs/jd_speed.log 2>&1 47 | # 东东超市 48 | 11 1-23/5 * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1 49 | # 取关京东店铺商品 50 | 55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1 51 | # 京豆变动通知 52 | 0 10 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1 53 | # 京东抽奖机 54 | 11 1 * * * node /scripts/jd_lotteryMachine.js >> /scripts/logs/jd_lotteryMachine.log 2>&1 55 | # 京东排行榜 56 | 11 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1 57 | # 天天提鹅 58 | 18 * * * * node /scripts/jd_daily_egg.js >> /scripts/logs/jd_daily_egg.log 2>&1 59 | # 金融养猪 60 | 12 * * * * node /scripts/jd_pigPet.js >> /scripts/logs/jd_pigPet.log 2>&1 61 | # 点点券 62 | 20 0,20 * * * node /scripts/jd_necklace.js >> /scripts/logs/jd_necklace.log 2>&1 63 | # 京喜工厂 64 | 20 * * * * node /scripts/jd_dreamFactory.js >> /scripts/logs/jd_dreamFactory.log 2>&1 65 | # 东东小窝 66 | 16 6 * * * node /scripts/jd_small_home.js >> /scripts/logs/jd_small_home.log 2>&1 67 | # 东东工厂 68 | 36 * * * * node /scripts/jd_jdfactory.js >> /scripts/logs/jd_jdfactory.log 2>&1 69 | # 十元街 70 | 36 8,18 * * * node /scripts/jd_syj.js >> /scripts/logs/jd_syj.log 2>&1 71 | # 京东代属(注:限校园用户可使用) 72 | 36 9 * * * node /scripts/jd_ds.js >> /scripts/logs/jd_ds.log 2>&1 73 | # 京东快递签到 74 | 23 1 * * * node /scripts/jd_kd.js >> /scripts/logs/jd_kd.log 2>&1 75 | # 京东汽车(签到满500赛点可兑换500京豆) 76 | 33 2 * * * node /scripts/jd_car.js >> /scripts/logs/jd_car.log 2>&1 77 | # 领京豆额外奖励(每日可获得3京豆) 78 | 33 4 * * * node /scripts/jd_bean_home.js >> /scripts/logs/jd_bean_home.log 2>&1 79 | # 京东直播(每日18豆) 80 | 10-20/5 11 * * * node /scripts/jd_live.js >> /scripts/logs/jd_live.log 2>&1 81 | # 微信小程序京东赚赚 82 | 10 11 * * * node /scripts/jd_jdzz.js >> /scripts/logs/jd_jdzz.log 2>&1 83 | # 宠汪汪邀请助力 84 | 10 10,11 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 85 | # 京东发现-看一看,看40个视频领80京豆(非常耗时) 86 | 13 11,14 * * * node /scripts/jd_watch.js >> /scripts/logs/jd_watch.log 2>&1 87 | -------------------------------------------------------------------------------- /docker/crontab_list_ts.sh: -------------------------------------------------------------------------------- 1 | #必须要的默认定时任务请勿删除 2 | 52 */1 * * * sh /scripts/docker/default_task.sh | ts >> /scripts/logs/default_task.log 2>&1 3 | # 每3天的23:50分清理一次日志 4 | 50 23 */3 * * rm -rf /scripts/logs/*.log 5 | 6 | ##############短期活动############## 7 | # 秒杀红包雨(2020.12.31活动过期) 8 | 40 8 1-31 12 * node /scripts/jd_ms_redrain.js | ts >> /scripts/logs/jd_ms_redrain.log 2>&1 9 | # 健康抽奖机(2020.12.31活动过期) 10 | 10 0 1-31 12 * node /scripts/jd_health.js | ts >> /scripts/logs/jd_health.log 2>&1 11 | # 直播红包雨(2020.12.31活动过期) 12 | 1 0,20,9-23/2 15-31 12 * node /scripts/jd_live_redrain.js | ts >> /scripts/logs/jd_live_redrain.log 2>&1 13 | # 京东金融打卡领年终奖(2020.12.31活动过期) 14 | 10 6 1-31 12 * node /scripts/jr_sign.js | ts >> /scripts/logs/jr_sign.log 2>&1 15 | # 京东健康APP集汪汪卡瓜分百万红包(2021.1.6活动过期) 16 | 10 8 * * * node /scripts/jd_jdh.js | ts >> /scripts/logs/jd_jdh.log 2>&1 17 | 18 | ##############长期活动############## 19 | # 签到 20 | 0 0,12,18 * * * cd /scripts && node jd_bean_sign.js | ts >> /scripts/logs/jd_bean_sign.log 2>&1 21 | # 京小超兑换奖品 22 | 0 0 * * * node /scripts/jd_blueCoin.js | ts >> /scripts/logs/jd_blueCoin.log 2>&1 23 | # 摇京豆 24 | 0 0 * * * node /scripts/jd_club_lottery.js | ts >> /scripts/logs/jd_club_lottery.log 2>&1 25 | # 东东农场 26 | 5 6-18/6 * * * node /scripts/jd_fruit.js | ts >> /scripts/logs/jd_fruit.log 2>&1 27 | # 宠汪汪 28 | 15 */2 * * * node /scripts/jd_joy.js | ts >> /scripts/logs/jd_joy.log 2>&1 29 | # 宠汪汪喂食 30 | 15 */1 * * * node /scripts/jd_joy_feedPets.js | ts >> /scripts/logs/jd_joy_feedPets.log 2>&1 31 | # 宠汪汪积分兑换奖品 32 | 0 0-16/8 * * * node /scripts/jd_joy_reward.js | ts >> /scripts/logs/jd_joy_reward.log 2>&1 33 | # 宠汪汪偷好友积分与狗粮 34 | 0 0,6 * * * node /scripts/jd_joy_steal.js | ts >> /scripts/logs/jd_joy_steal.log 2>&1 35 | # 摇钱树 36 | 0 */2 * * * node /scripts/jd_moneyTree.js | ts >> /scripts/logs/jd_moneyTree.log 2>&1 37 | # 东东萌宠 38 | 5 6-18/6 * * * node /scripts/jd_pet.js | ts >> /scripts/logs/jd_pet.log 2>&1 39 | # 京东种豆得豆 40 | 0 7-22/1 * * * node /scripts/jd_plantBean.js | ts >> /scripts/logs/jd_plantBean.log 2>&1 41 | # 京东全民开红包 42 | 1 1 * * * node /scripts/jd_redPacket.js | ts >> /scripts/logs/jd_redPacket.log 2>&1 43 | # 进店领豆 44 | 10 0 * * * node /scripts/jd_shop.js | ts >> /scripts/logs/jd_shop.log 2>&1 45 | # 京东天天加速 46 | 8 */3 * * * node /scripts/jd_speed.js | ts >> /scripts/logs/jd_speed.log 2>&1 47 | # 东东超市 48 | 11 1-23/5 * * * node /scripts/jd_superMarket.js | ts >> /scripts/logs/jd_superMarket.log 2>&1 49 | # 取关京东店铺商品 50 | 55 23 * * * node /scripts/jd_unsubscribe.js | ts >> /scripts/logs/jd_unsubscribe.log 2>&1 51 | # 京豆变动通知 52 | 0 10 * * * node /scripts/jd_bean_change.js | ts >> /scripts/logs/jd_bean_change.log 2>&1 53 | # 京东抽奖机 54 | 11 1 * * * node /scripts/jd_lotteryMachine.js | ts >> /scripts/logs/jd_lotteryMachine.log 2>&1 55 | # 京东排行榜 56 | 11 9 * * * node /scripts/jd_rankingList.js | ts >> /scripts/logs/jd_rankingList.log 2>&1 57 | # 天天提鹅 58 | 18 * * * * node /scripts/jd_daily_egg.js | ts >> /scripts/logs/jd_daily_egg.log 2>&1 59 | # 金融养猪 60 | 12 * * * * node /scripts/jd_pigPet.js | ts >> /scripts/logs/jd_pigPet.log 2>&1 61 | # 点点券 62 | 20 0,20 * * * node /scripts/jd_necklace.js | ts >> /scripts/logs/jd_necklace.log 2>&1 63 | # 京喜工厂 64 | 20 * * * * node /scripts/jd_dreamFactory.js | ts >> /scripts/logs/jd_dreamFactory.log 2>&1 65 | # 东东小窝 66 | 16 6 * * * node /scripts/jd_small_home.js | ts >> /scripts/logs/jd_small_home.log 2>&1 67 | # 东东工厂 68 | 36 * * * * node /scripts/jd_jdfactory.js | ts >> /scripts/logs/jd_jdfactory.log 2>&1 69 | # 十元街 70 | 36 8,18 * * * node /scripts/jd_syj.js | ts >> /scripts/logs/jd_syj.log 2>&1 71 | # 京东代属(注:限校园用户可使用) 72 | 36 9 * * * node /scripts/jd_ds.js | ts >> /scripts/logs/jd_ds.log 2>&1 73 | # 京东快递签到 74 | 23 1 * * * node /scripts/jd_kd.js | ts >> /scripts/logs/jd_kd.log 2>&1 75 | # 京东汽车(签到满500赛点可兑换500京豆) 76 | 33 2 * * * node /scripts/jd_car.js | ts >> /scripts/logs/jd_car.log 2>&1 77 | # 领京豆额外奖励(每日可获得3京豆) 78 | 33 4 * * * node /scripts/jd_bean_home.js | ts >> /scripts/logs/jd_bean_home.log 2>&1 79 | # 京东直播(每日18豆) 80 | 10-20/5 11 * * * node /scripts/jd_live.js | ts >> /scripts/logs/jd_live.log 2>&1 81 | #微信小程序京东赚赚 82 | 10 11 * * * node /scripts/jd_jdzz.js | ts >> /scripts/logs/jd_jdzz.log 2>&1 83 | #宠汪汪邀请助力 84 | 10 10,11 * * * node /scripts/jd_joy_run.js >> /scripts/logs/jd_joy_run.log 2>&1 85 | -------------------------------------------------------------------------------- /docker/default_task.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "定时任务更新代码,git 拉取最新代码,并安装更新依赖..." 5 | git -C /scripts pull 6 | npm install --prefix /scripts 7 | 8 | ######################################获取docker构建文件里面的自定义信息方法-start##################################################### 9 | function getDockerImageLabel() { 10 | repo=akyakya/jd_scripts 11 | imageTag=latest 12 | token=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" | jq -r '.token') 13 | 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) 14 | 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) 15 | echo $labels 16 | } 17 | ######################################获取docker构建文件里面的自定义信息方法-end##################################################### 18 | 19 | ######################################对比版本版本号大小方法-start################################################################### 20 | function version_gt() { 21 | test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" 22 | } 23 | ######################################对比版本版本号大小方法-end################################################################### 24 | 25 | #######################################通知用户更新镜像-start##################################################################### 26 | echo "检查docker镜像更新更新..." 27 | if type jq >/dev/null 2>&1; then 28 | echo "获取dockerhub仓库镜像labels信息..." 29 | labels=$(getDockerImageLabel) 30 | export NOTIFY_CONTENT=$(echo $labels | jq -r .UPDATE_CONTENT) 31 | version=$(echo $labels | jq -r .VERSION) 32 | else 33 | # 第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知 34 | echo "当前容版版本过旧,发送镜像更新通知" 35 | export NOTIFY_CONTENT="更新内容较多,重新阅读仓库Readme(https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" 36 | cd /scripts/docker 37 | node notify_docker_user.js 38 | fi 39 | 40 | #通知通知用户更新镜像 41 | if [ ! $BUILD_VERSION ]; then 42 | if [ $version ]; then 43 | echo "当前容器版本为空,dockerhub仓库版本为$version,发送通知" 44 | cd /scripts/docker 45 | node notify_docker_user.js 46 | fi 47 | else 48 | if version_gt $version $BUILD_VERSION; then 49 | echo "当前容器版本为$BUILD_VERSION,dockerhub仓库版本为$version,发送通知" 50 | cd /scripts/docker 51 | node notify_docker_user.js 52 | fi 53 | fi 54 | #######################################通知用户更新镜像-end##################################################################### 55 | 56 | ##兼容旧镜像的环境变量 57 | if [ !$DEFAULT_LIST_FILE ]; then 58 | defaultListFile="/scripts/docker/crontab_list.sh" 59 | else 60 | defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" 61 | fi 62 | 63 | customListFile="/scripts/docker/$CUSTOM_LIST_FILE" 64 | mergedListFile="/scripts/docker/merged_list_file.sh" 65 | 66 | if type ts >/dev/null 2>&1; then 67 | echo '系统已安装moreutils工具包,默认定时任务增加|ts 输出' 68 | ##复制一个新文件来追加|ts,防止git pull的时候冲突 69 | cp $defaultListFile /scripts/docker/default_list.sh 70 | defaultListFile="/scripts/docker/default_list.sh" 71 | 72 | sed -i 's/>>/|ts >>/g' $defaultListFile 73 | fi 74 | 75 | echo "定时任务合并加载最新定时任务列表..." 76 | #判断 自定义文件是否存在 是否存在 77 | if [ $CUSTOM_LIST_FILE ]; then 78 | echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." 79 | if [ -f "$customListFile" ]; then 80 | if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then 81 | echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" 82 | cat $defaultListFile >$mergedListFile 83 | echo -e "" >>$mergedListFile 84 | cat $customListFile >>$mergedListFile 85 | elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then 86 | cat $customListFile >$mergedListFile 87 | echo "$CUSTOM_LIST_FILE but file ..." 88 | echo "配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." 89 | touch "$customListFile" 90 | else 91 | echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." 92 | cat $defaultListFile >$mergedListFile 93 | fi 94 | else 95 | echo "配置的自定义任务文件:$CUSTOM_LIST_FILE未找到,使用默认配置$DEFAULT_LIST_FILE..." 96 | cat $defaultListFile >$mergedListFile 97 | fi 98 | else 99 | echo "当前使用的为默认定时任务文件 $DEFAULT_LIST_FILE ..." 100 | cat $defaultListFile >$mergedListFile 101 | fi 102 | 103 | # 判断最后要加载的定时任务是否包含默认定时任务,不包含的话就加进去 104 | if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then 105 | echo "合并后的定时任务文件,未包含必须的默认定时任务,增加默认定时任务..." 106 | echo -e >>$mergedListFile 107 | echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile 108 | fi 109 | 110 | if [ $RANDOM_DELAY_MAX -ge 1 ]; then 111 | echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... " 112 | sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reawrd.js\|jd_joy_steal.js\|jd_joy_feedPets.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile 113 | fi 114 | 115 | echo "加载最新的定时任务文件..." 116 | crontab $mergedListFile 117 | -------------------------------------------------------------------------------- /docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | jd_scripts: 2 | image: akyakya/jd_scripts 3 | container_name: jd_scripts 4 | restart: always 5 | #如果需要自定定义定时任务的需要自己写好`my_crontab_list.sh`文件 ,取消下面的挂载注释 ,通过 `volumes`挂载进去。 6 | volumes: 7 | # - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh 8 | - ./logs:/scripts/logs 9 | tty: true 10 | environment: 11 | # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 12 | #jd cookies 13 | # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX 14 | - JD_COOKIE= 15 | #微信server酱通 16 | - PUSH_KEY= 17 | #Bark App通知 18 | - BARK_PUSH= 19 | #telegram机器人通知 20 | - TG_BOT_TOKEN= 21 | - TG_USER_ID= 22 | #钉钉机器人通知 23 | - DD_BOT_TOKEN= 24 | - DD_BOT_SECRET= 25 | #京东种豆得豆 26 | - PLANT_BEAN_SHARECODES= 27 | #京东农场 28 | # 例: FRUITSHARECODES=京东农场的互助码 29 | - FRUITSHARECODES= 30 | #京东萌宠 31 | # 例: PETSHARECODES=东东萌宠的互助码 32 | - PETSHARECODES= 33 | # 宠汪汪的喂食数量 34 | - JOY_FEED_COUNT= 35 | #京小超 36 | # - SUPERMARKET_SHARECODES= 37 | #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) 38 | # 例: MARKET_COIN_TO_BEANS=1000 39 | - MARKET_COIN_TO_BEANS= 40 | #是否开启debug模式打印日志 41 | # 例: JD_DEBUG=false 42 | - JD_DEBUG= 43 | #如果使用自定义定时任务,取消下面一行的注释 44 | #- CRONTAB_LIST_FILE=my_crontab_list.sh 45 | command: 46 | - /bin/sh 47 | - -c 48 | - | 49 | #crontab /scripts/docker/my_crontab_list.sh #如果挂载了自定义任务文件,取消此条注释即可 50 | crond 51 | git -C /scripts/ pull 52 | node 53 | -------------------------------------------------------------------------------- /docker/docker_entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | export LANG="zh_CN.UTF-8" 5 | 6 | if [ $1 ]; then 7 | echo "Currently does not support specifying startup parameters" 8 | echo "Please delete the last command attached to $(docker run) or the configured $(command:) parameter in $(docker-compose.yml)" 9 | echo "暂时不支持指定启动参数,请删除 docker run时最后附带的命令 或者 docker-compose.yml中的配置的command:指令 " 10 | fi 11 | 12 | echo "##############################################################################" 13 | echo "Container start , Pull the latest code..." 14 | echo "容器启动,git 拉取最新代码..." 15 | git -C /scripts pull 16 | npm install --prefix /scripts 17 | echo "##############################################################################" 18 | 19 | ######################################获取docker构建文件里面的自定义信息方法-start##################################################### 20 | function getDockerImageLabel() { 21 | repo=akyakya/jd_scripts 22 | imageTag=latest 23 | token=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" | jq -r '.token') 24 | 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) 25 | 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) 26 | echo $labels 27 | } 28 | ######################################获取docker构建文件里面的自定义信息方法-end##################################################### 29 | 30 | ######################################对比版本版本号大小方法-start################################################################### 31 | function version_gt() { 32 | test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1" 33 | } 34 | ######################################对比版本版本号大小方法-end################################################################### 35 | 36 | #######################################通知用户更新镜像-start##################################################################### 37 | echo "check docker images update..." 38 | echo "检查docker镜像更新更新..." 39 | if type jq >/dev/null 2>&1; then 40 | echo "get dockerhub repo images labels..." 41 | echo "获取dockerhub仓库镜像labels信息..." 42 | labels=$(getDockerImageLabel) 43 | export NOTIFY_CONTENT=$(echo $labels | jq -r .UPDATE_CONTENT) 44 | version=$(echo $labels | jq -r .VERSION) 45 | else 46 | # 第一版通知逻辑无法包含在上面判断里面,镜像构建好直接开启通知 47 | echo "Current container version is too old, send update notification" 48 | echo "当前版本过旧,发送镜像更新通知" 49 | export NOTIFY_CONTENT="更新内容较多,重新阅读仓库Readme(https://github.com/lxk0301/jd_scripts/tree/master/docker),更新镜像并更新配置后使用。" 50 | cd /scripts/docker 51 | node notify_docker_user.js 52 | fi 53 | 54 | #通知通知用户更新镜像 55 | if [ ! $BUILD_VERSION ]; then 56 | if [ $version ]; then 57 | echo "Current container version is empty, dockerhub lastet $version, send update notification" 58 | echo "当前容器版本为空,dockerhub仓库版本为$version,发送更新通知" 59 | cd /scripts/docker 60 | node notify_docker_user.js 61 | fi 62 | else 63 | if version_gt $version $BUILD_VERSION; then 64 | echo "Current container version $BUILD_VERSION, dockerhub lastet version $version, send update notification" 65 | echo "当前容器版本为$BUILD_VERSION,dockerhub仓库版本为$version,发送通知" 66 | cd /scripts/docker 67 | node notify_docker_user.js 68 | fi 69 | fi 70 | #######################################通知用户更新镜像-end##################################################################### 71 | 72 | ##兼容旧镜像的环境变量 73 | if [ !$DEFAULT_LIST_FILE ]; then 74 | defaultListFile="/scripts/docker/crontab_list.sh" 75 | else 76 | defaultListFile="/scripts/docker/$DEFAULT_LIST_FILE" 77 | fi 78 | 79 | customListFile="/scripts/docker/$CUSTOM_LIST_FILE" 80 | mergedListFile="/scripts/docker/merged_list_file.sh" 81 | 82 | if type ts >/dev/null 2>&1; then 83 | echo 'moreutils tools installed, default task append |ts output' 84 | echo '系统已安装moreutils工具包,默认定时任务增加|ts 输出' 85 | ##复制一个新文件来追加|ts,防止git pull的时候冲突 86 | cp $defaultListFile /scripts/docker/default_list.sh 87 | defaultListFile="/scripts/docker/default_list.sh" 88 | 89 | sed -i 's/>>/|ts >>/g' $defaultListFile 90 | fi 91 | 92 | #判断 自定义文件是否存在 是否存在 93 | if [ $CUSTOM_LIST_FILE ]; then 94 | echo "You have configured a custom list file: $CUSTOM_LIST_FILE, custom list merge type: $CUSTOM_LIST_MERGE_TYPE..." 95 | echo "您配置了自定义任务文件:$CUSTOM_LIST_FILE,自定义任务类型为:$CUSTOM_LIST_MERGE_TYPE..." 96 | if [ -f "$customListFile" ]; then 97 | if [ $CUSTOM_LIST_MERGE_TYPE == "append" ]; then 98 | echo "merge default list file: $DEFAULT_LIST_FILE and custom list file: $CUSTOM_LIST_FILE" 99 | echo "合并默认定时任务文件:$DEFAULT_LIST_FILE 和 自定义定时任务文件:$CUSTOM_LIST_FILE" 100 | cat $defaultListFile >$mergedListFile 101 | echo -e "" >>$mergedListFile 102 | cat $customListFile >>$mergedListFile 103 | elif [ $CUSTOM_LIST_MERGE_TYPE == "overwrite" ]; then 104 | cat $customListFile >$mergedListFile 105 | echo "merge custom list file: $CUSTOM_LIST_FILE..." 106 | echo "合并自定义任务文件:$CUSTOM_LIST_FILE" 107 | touch "$customListFile" 108 | else 109 | echo "配置配置了错误的自定义定时任务类型:$CUSTOM_LIST_MERGE_TYPE,自定义任务类型为只能为append或者overwrite..." 110 | cat $defaultListFile >$mergedListFile 111 | fi 112 | else 113 | echo "Not found custom list file: $CUSTOM_LIST_FILE ,use default list file: $DEFAULT_LIST_FILE" 114 | echo "自定义任务文件:$CUSTOM_LIST_FILE 未找到,使用默认配置$DEFAULT_LIST_FILE..." 115 | cat $defaultListFile >$mergedListFile 116 | fi 117 | else 118 | echo "The currently used is the default crontab task file: $DEFAULT_LIST_FILE ..." 119 | echo "当前使用的为默认定时任务文件 $DEFAULT_LIST_FILE ..." 120 | cat $defaultListFile >$mergedListFile 121 | fi 122 | 123 | # 判断最后要加载的定时任务是否包含默认定时任务,不包含的话就加进去 124 | if [ $(grep -c "default_task.sh" $mergedListFile) -eq '0' ]; then 125 | echo "Merged crontab task file,the required default task is not included, append default task..." 126 | echo "合并后的定时任务文件,未包含必须的默认定时任务,增加默认定时任务..." 127 | echo -e >>$mergedListFile 128 | echo "52 */1 * * * sh /scripts/docker/default_task.sh |ts >> /scripts/logs/default_task.log 2>&1" >>$mergedListFile 129 | fi 130 | 131 | if [ $RANDOM_DELAY_MAX -ge 1 ]; then 132 | echo "已设置随机延迟为 $RANDOM_DELAY_MAX , 设置延迟任务中... " 133 | sed -i "/\(jd_bean_sign.js\|jd_blueCoin.js\|jd_joy_reawrd.js\|jd_joy_steal.js\|jd_joy_feedPets.js\)/!s/node/sleep \$((RANDOM % \$RANDOM_DELAY_MAX)); node/g" $mergedListFile 134 | fi 135 | 136 | echo "Load the latest crontab task file..." 137 | echo "加载最新的定时任务文件..." 138 | crontab $mergedListFile 139 | 140 | echo "Start crontab task main process..." 141 | echo "启动crondtab定时任务主进程..." 142 | crond -f 143 | -------------------------------------------------------------------------------- /docker/docker多账户使用独立容器使用说明.md: -------------------------------------------------------------------------------- 1 | ### 使用此方式,请先理解学会使用[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)的使用方式 2 | > 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。 3 | 配置使用起来还是比较简单的,具体往下看 4 | ### 文件夹目录参考 5 | ![image](https://user-images.githubusercontent.com/6993269/97781779-885ae700-1bc8-11eb-93a4-b274cbd6062c.png) 6 | ### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/lxk0301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() 7 | ![image](https://user-images.githubusercontent.com/6993269/97781610-a1af6380-1bc7-11eb-9397-903b47f5ad6b.png) 8 | #### `docker-compose.yml`文件参考 9 | ```yaml 10 | version: '3' 11 | services: 12 | jd_scripts1: 13 | image: akyakya/jd_scripts 14 | restart: always 15 | container_name: jd_scripts1 16 | tty: true 17 | volumes: 18 | - ./logs1:/scripts/logs 19 | environment: 20 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 21 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 22 | - TG_USER_ID=12xxxx206 23 | - CRONTAB_LIST_FILE=crontab_list.sh 24 | command: 25 | - /bin/sh 26 | - -c 27 | - | 28 | git -C /scripts/ pull 29 | crond 30 | node 31 | jd_scripts2: 32 | image: akyakya/jd_scripts 33 | restart: always 34 | container_name: jd_scripts2 35 | tty: true 36 | volumes: 37 | - ./logs2:/scripts/logs 38 | environment: 39 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 40 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 41 | - TG_USER_ID=12xxxx206 42 | - CRONTAB_LIST_FILE=crontab_list.sh 43 | command: 44 | - /bin/sh 45 | - -c 46 | - | 47 | git -C /scripts/ pull 48 | crond 49 | node 50 | jd_scripts3: 51 | image: akyakya/jd_scripts 52 | restart: always 53 | container_name: jd_scripts3 54 | tty: true 55 | volumes: 56 | - ./logs3:/scripts/logs 57 | - ./my_crontab_list3.sh:/scripts/docker/my_crontab_list.sh 58 | environment: 59 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 60 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 61 | - TG_USER_ID=12xxxx206 62 | - CRONTAB_LIST_FILE=my_crontab_list.sh 63 | command: 64 | - /bin/sh 65 | - -c 66 | - | 67 | crontab /scripts/docker/my_crontab_list.sh 68 | git -C /scripts/ pull 69 | crond 70 | node 71 | jd_scripts4: 72 | image: akyakya/jd_scripts 73 | restart: always 74 | container_name: jd_scripts4 75 | tty: true 76 | volumes: 77 | - ./logs4:/scripts/logs 78 | - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh 79 | environment: 80 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 81 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 82 | - TG_USER_ID=12xxxx206 83 | - CRONTAB_LIST_FILE=my_crontab_list.sh 84 | command: 85 | - /bin/sh 86 | - -c 87 | - | 88 | crontab /scripts/docker/my_crontab_list.sh 89 | git -C /scripts/ pull 90 | crond 91 | node 92 | jd_scripts5: 93 | image: akyakya/jd_scripts 94 | restart: always 95 | container_name: jd_scripts5 96 | tty: true 97 | volumes: 98 | - ./logs5:/scripts/logs 99 | - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh 100 | environment: 101 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 102 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 103 | - TG_USER_ID=12xxxx206 104 | - CRONTAB_LIST_FILE=my_crontab_list.sh 105 | command: 106 | - /bin/sh 107 | - -c 108 | - | 109 | crontab /scripts/docker/my_crontab_list.sh 110 | git -C /scripts/ pull 111 | crond 112 | node 113 | ``` 114 | #### 目录文件配置好之后在 `jd_scripts_multi`目录执行 115 | `docker-compose up -d` 启动; 116 | `docker-compose logs` 打印日志; 117 | `docker-compose pull` 更新镜像; 118 | `docker-compose stop` 停止容器; 119 | `docker-compose restart` 重启容器; 120 | `docker-compose down` 停止并删除容器; 121 | ![image](https://user-images.githubusercontent.com/6993269/97781935-8fcec000-1bc9-11eb-9d1a-d219e7a1caa9.png) 122 | 123 | 124 | -------------------------------------------------------------------------------- /docker/example/custom-append.yml: -------------------------------------------------------------------------------- 1 | jd_scripts: 2 | image: akyakya/jd_scripts 3 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) 4 | # 经过实际测试,建议不低于200M 5 | # deploy: 6 | # resources: 7 | # limits: 8 | # cpus: '0.2' 9 | # memory: 200M 10 | container_name: jd_scripts 11 | restart: always 12 | volumes: 13 | - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh 14 | - ./logs:/scripts/logs 15 | tty: true 16 | environment: 17 | # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 18 | #jd cookies 19 | # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX 20 | - JD_COOKIE= 21 | #微信server酱通 22 | - PUSH_KEY= 23 | #Bark App通知 24 | - BARK_PUSH= 25 | #telegram机器人通知 26 | - TG_BOT_TOKEN= 27 | - TG_USER_ID= 28 | #钉钉机器人通知 29 | - DD_BOT_TOKEN= 30 | - DD_BOT_SECRET= 31 | #京东种豆得豆 32 | - PLANT_BEAN_SHARECODES= 33 | #京东农场 34 | # 例: FRUITSHARECODES=京东农场的互助码 35 | - FRUITSHARECODES= 36 | #京东萌宠 37 | # 例: PETSHARECODES=东东萌宠的互助码 38 | - PETSHARECODES= 39 | # 宠汪汪的喂食数量 40 | - JOY_FEED_COUNT= 41 | #京小超 42 | # - SUPERMARKET_SHARECODES= 43 | #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) 44 | # 例: MARKET_COIN_TO_BEANS=1000 45 | - MARKET_COIN_TO_BEANS= 46 | #是否开启debug模式打印日志 47 | # 例: JD_DEBUG=false 48 | - JD_DEBUG= 49 | #使用自定义定任务追加默认任务之后,上面volumes挂载之后这里配置对应的文件名 50 | - CUSTOM_LIST_FILE=my_crontab_list.sh 51 | 52 | -------------------------------------------------------------------------------- /docker/example/custom-overwrite.yml: -------------------------------------------------------------------------------- 1 | jd_scripts: 2 | image: akyakya/jd_scripts 3 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) 4 | # 经过实际测试,建议不低于200M 5 | # deploy: 6 | # resources: 7 | # limits: 8 | # cpus: '0.2' 9 | # memory: 200M 10 | container_name: jd_scripts 11 | restart: always 12 | volumes: 13 | - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh 14 | - ./logs:/scripts/logs 15 | tty: true 16 | environment: 17 | # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 18 | #jd cookies 19 | # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX 20 | - JD_COOKIE= 21 | #微信server酱通 22 | - PUSH_KEY= 23 | #Bark App通知 24 | - BARK_PUSH= 25 | #telegram机器人通知 26 | - TG_BOT_TOKEN= 27 | - TG_USER_ID= 28 | #钉钉机器人通知 29 | - DD_BOT_TOKEN= 30 | - DD_BOT_SECRET= 31 | #京东种豆得豆 32 | - PLANT_BEAN_SHARECODES= 33 | #京东农场 34 | # 例: FRUITSHARECODES=京东农场的互助码 35 | - FRUITSHARECODES= 36 | #京东萌宠 37 | # 例: PETSHARECODES=东东萌宠的互助码 38 | - PETSHARECODES= 39 | # 宠汪汪的喂食数量 40 | - JOY_FEED_COUNT= 41 | #京小超 42 | # - SUPERMARKET_SHARECODES= 43 | #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) 44 | # 例: MARKET_COIN_TO_BEANS=1000 45 | - MARKET_COIN_TO_BEANS= 46 | #是否开启debug模式打印日志 47 | # 例: JD_DEBUG=false 48 | - JD_DEBUG= 49 | #使用自定义定任务追加默认任务之后,上面volumes挂载之后这里配置对应的文件名,和自定义文件使用方式为overwrite 50 | - CUSTOM_LIST_FILE=my_crontab_list.sh 51 | - CUSTOM_LIST_MERGE_TYPE=overwrite 52 | -------------------------------------------------------------------------------- /docker/example/default.yml: -------------------------------------------------------------------------------- 1 | jd_scripts: 2 | image: akyakya/jd_scripts 3 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) 4 | # 经过实际测试,建议不低于200M 5 | # deploy: 6 | # resources: 7 | # limits: 8 | # cpus: '0.2' 9 | # memory: 200M 10 | container_name: jd_scripts 11 | restart: always 12 | volumes: 13 | - ./logs:/scripts/logs 14 | tty: true 15 | environment: 16 | # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 17 | #jd cookies 18 | # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX 19 | - JD_COOKIE= 20 | #微信server酱通 21 | - PUSH_KEY= 22 | #Bark App通知 23 | - BARK_PUSH= 24 | #telegram机器人通知 25 | - TG_BOT_TOKEN= 26 | - TG_USER_ID= 27 | #钉钉机器人通知 28 | - DD_BOT_TOKEN= 29 | - DD_BOT_SECRET= 30 | #京东种豆得豆 31 | - PLANT_BEAN_SHARECODES= 32 | #京东农场 33 | # 例: FRUITSHARECODES=京东农场的互助码 34 | - FRUITSHARECODES= 35 | #京东萌宠 36 | # 例: PETSHARECODES=东东萌宠的互助码 37 | - PETSHARECODES= 38 | # 宠汪汪的喂食数量 39 | - JOY_FEED_COUNT= 40 | #京小超 41 | # - SUPERMARKET_SHARECODES= 42 | #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) 43 | # 例: MARKET_COIN_TO_BEANS=1000 44 | - MARKET_COIN_TO_BEANS= 45 | #是否开启debug模式打印日志 46 | # 例: JD_DEBUG=false 47 | - JD_DEBUG= 48 | 49 | #如果设置了 RANDOM_DELAY_MAX ,则会启用随机延迟功能,延迟随机 0 到 RANDOM_DELAY_MAX-1 秒。如果不设置此项,则不使用延迟。 50 | #并不是所有的脚本都会被启用延迟,因为有一些脚本需要整点触发。延迟的目的有两个,1是降低抢占cpu资源几率,2是降低检查风险(主要是1) 51 | #填写数字,单位为秒,比如写为 RANDOM_DELAY_MAX=30 就是随机产生0到29之间的一个秒数,执行延迟的意思。 52 | - RANDOM_DELAY_MAX= 53 | 54 | -------------------------------------------------------------------------------- /docker/example/docker多账户使用独立容器使用说明.md: -------------------------------------------------------------------------------- 1 | ### 使用此方式,请先理解学会使用[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)的使用方式 2 | > 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。 3 | 配置使用起来还是比较简单的,具体往下看 4 | ### 文件夹目录参考 5 | ![image](https://user-images.githubusercontent.com/6993269/97781779-885ae700-1bc8-11eb-93a4-b274cbd6062c.png) 6 | ### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/lxk0301/jd_scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]() 7 | ![image](https://user-images.githubusercontent.com/6993269/97781610-a1af6380-1bc7-11eb-9397-903b47f5ad6b.png) 8 | #### `docker-compose.yml`文件参考 9 | ```yaml 10 | version: "3" 11 | services: 12 | jd_scripts1: #默认 13 | image: akyakya/jd_scripts 14 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) 15 | # 经过实际测试,建议不低于200M 16 | # deploy: 17 | # resources: 18 | # limits: 19 | # cpus: '0.2' 20 | # memory: 200M 21 | restart: always 22 | container_name: jd_scripts1 23 | tty: true 24 | volumes: 25 | - ./logs1:/scripts/logs 26 | environment: 27 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 28 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 29 | - TG_USER_ID=12xxxx206 30 | # 互助助码等参数可自行增加,如下。 31 | # 京东种豆得豆 32 | # - PLANT_BEAN_SHARECODES= 33 | 34 | jd_scripts2: #默认 35 | image: akyakya/jd_scripts 36 | restart: always 37 | container_name: jd_scripts2 38 | tty: true 39 | volumes: 40 | - ./logs2:/scripts/logs 41 | environment: 42 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 43 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 44 | - TG_USER_ID=12xxxx206 45 | jd_scripts4: #自定义追加默认之后 46 | image: akyakya/jd_scripts 47 | restart: always 48 | container_name: jd_scripts4 49 | tty: true 50 | volumes: 51 | - ./logs4:/scripts/logs 52 | - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh 53 | environment: 54 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 55 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 56 | - TG_USER_ID=12xxxx206 57 | - CUSTOM_LIST_FILE=my_crontab_list.sh 58 | jd_scripts5: #自定义覆盖默认 59 | image: akyakya/jd_scripts 60 | restart: always 61 | container_name: jd_scripts5 62 | tty: true 63 | volumes: 64 | - ./logs5:/scripts/logs 65 | - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh 66 | environment: 67 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 68 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 69 | - TG_USER_ID=12xxxx206 70 | - CUSTOM_LIST_FILE=my_crontab_list.sh 71 | - CUSTOM_LIST_MERGE_TYPE=overwrite 72 | 73 | ``` 74 | #### 目录文件配置好之后在 `jd_scripts_multi`目录执行 75 | `docker-compose up -d` 启动; 76 | `docker-compose logs` 打印日志; 77 | `docker-compose pull` 更新镜像; 78 | `docker-compose stop` 停止容器; 79 | `docker-compose restart` 重启容器; 80 | `docker-compose down` 停止并删除容器; 81 | ![image](https://user-images.githubusercontent.com/6993269/97781935-8fcec000-1bc9-11eb-9d1a-d219e7a1caa9.png) 82 | 83 | 84 | -------------------------------------------------------------------------------- /docker/example/jd_scripts.custom-append.syno.json: -------------------------------------------------------------------------------- 1 | { 2 | "cap_add" : [], 3 | "cap_drop" : [], 4 | "cmd" : "", 5 | "cpu_priority" : 50, 6 | "devices" : null, 7 | "enable_publish_all_ports" : false, 8 | "enable_restart_policy" : true, 9 | "enabled" : true, 10 | "env_variables" : [ 11 | { 12 | "key" : "PATH", 13 | "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 14 | }, 15 | { 16 | "key" : "CDN_JD_DAILYBONUS", 17 | "value" : "true" 18 | }, 19 | { 20 | "key" : "JD_COOKIE", 21 | "value" : "pt_key=xxx;pt_pin=xxx;" 22 | }, 23 | { 24 | "key" : "PUSH_KEY", 25 | "value" : "" 26 | }, 27 | { 28 | "key" : "CUSTOM_LIST_FILE", 29 | "value" : "my_crontab_list.sh" 30 | } 31 | ], 32 | "exporting" : false, 33 | "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", 34 | "image" : "akyakya/jd_scripts", 35 | "is_ddsm" : false, 36 | "is_package" : false, 37 | "links" : [], 38 | "memory_limit" : 0, 39 | "name" : "jd_scripts", 40 | "network" : [ 41 | { 42 | "driver" : "bridge", 43 | "name" : "bridge" 44 | } 45 | ], 46 | "network_mode" : "default", 47 | "port_bindings" : [], 48 | "privileged" : false, 49 | "shortcut" : { 50 | "enable_shortcut" : false 51 | }, 52 | "use_host_network" : false, 53 | "volume_bindings" : [ 54 | { 55 | "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", 56 | "mount_point" : "/scripts/docker/my_crontab_list.sh", 57 | "type" : "rw" 58 | }, 59 | { 60 | "host_volume_file" : "/docker/jd_scripts/logs", 61 | "mount_point" : "/scripts/logs", 62 | "type" : "rw" 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /docker/example/jd_scripts.custom-overwrite.syno.json: -------------------------------------------------------------------------------- 1 | { 2 | "cap_add" : [], 3 | "cap_drop" : [], 4 | "cmd" : "", 5 | "cpu_priority" : 50, 6 | "devices" : null, 7 | "enable_publish_all_ports" : false, 8 | "enable_restart_policy" : true, 9 | "enabled" : true, 10 | "env_variables" : [ 11 | { 12 | "key" : "PATH", 13 | "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 14 | }, 15 | { 16 | "key" : "CDN_JD_DAILYBONUS", 17 | "value" : "true" 18 | }, 19 | { 20 | "key" : "JD_COOKIE", 21 | "value" : "pt_key=xxx;pt_pin=xxx;" 22 | }, 23 | { 24 | "key" : "PUSH_KEY", 25 | "value" : "" 26 | }, 27 | { 28 | "key" : "CUSTOM_LIST_FILE", 29 | "value" : "my_crontab_list.sh" 30 | }, 31 | { 32 | "key" : "CUSTOM_LIST_MERGE_TYPE", 33 | "value" : "overwrite" 34 | } 35 | ], 36 | "exporting" : false, 37 | "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", 38 | "image" : "akyakya/jd_scripts", 39 | "is_ddsm" : false, 40 | "is_package" : false, 41 | "links" : [], 42 | "memory_limit" : 0, 43 | "name" : "jd_scripts", 44 | "network" : [ 45 | { 46 | "driver" : "bridge", 47 | "name" : "bridge" 48 | } 49 | ], 50 | "network_mode" : "default", 51 | "port_bindings" : [], 52 | "privileged" : false, 53 | "shortcut" : { 54 | "enable_shortcut" : false 55 | }, 56 | "use_host_network" : false, 57 | "volume_bindings" : [ 58 | { 59 | "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", 60 | "mount_point" : "/scripts/docker/my_crontab_list.sh", 61 | "type" : "rw" 62 | }, 63 | { 64 | "host_volume_file" : "/docker/jd_scripts/logs", 65 | "mount_point" : "/scripts/logs", 66 | "type" : "rw" 67 | } 68 | ] 69 | } 70 | -------------------------------------------------------------------------------- /docker/example/jd_scripts.syno.json: -------------------------------------------------------------------------------- 1 | { 2 | "cap_add" : null, 3 | "cap_drop" : null, 4 | "cmd" : "", 5 | "cpu_priority" : 0, 6 | "devices" : null, 7 | "enable_publish_all_ports" : false, 8 | "enable_restart_policy" : true, 9 | "enabled" : false, 10 | "env_variables" : [ 11 | { 12 | "key" : "PATH", 13 | "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 14 | }, 15 | { 16 | "key" : "CDN_JD_DAILYBONUS", 17 | "value" : "true" 18 | }, 19 | { 20 | "key" : "JD_COOKIE", 21 | "value" : "pt_key=AAJfjaNrADASxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxx5;" 22 | }, 23 | { 24 | "key" : "TG_BOT_TOKEN", 25 | "value" : "13xxxxxx80:AAEkNxxxxxxzNf91WQ" 26 | }, 27 | { 28 | "key" : "TG_USER_ID", 29 | "value" : "12xxxx206" 30 | }, 31 | { 32 | "key" : "PLANT_BEAN_SHARECODES", 33 | "value" : "" 34 | }, 35 | { 36 | "key" : "FRUITSHARECODES", 37 | "value" : "" 38 | }, 39 | { 40 | "key" : "PETSHARECODES", 41 | "value" : "" 42 | }, 43 | { 44 | "key" : "SUPERMARKET_SHARECODES", 45 | "value" : "" 46 | }, 47 | { 48 | "key" : "CRONTAB_LIST_FILE", 49 | "value" : "crontab_list.sh" 50 | } 51 | ], 52 | "exporting" : false, 53 | "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", 54 | "image" : "akyakya/jd_scripts", 55 | "is_ddsm" : false, 56 | "is_package" : false, 57 | "links" : [], 58 | "memory_limit" : 0, 59 | "name" : "jd_scripts", 60 | "network" : [ 61 | { 62 | "driver" : "bridge", 63 | "name" : "bridge" 64 | } 65 | ], 66 | "network_mode" : "default", 67 | "port_bindings" : [], 68 | "privileged" : false, 69 | "shortcut" : { 70 | "enable_shortcut" : false, 71 | "enable_status_page" : false, 72 | "enable_web_page" : false, 73 | "web_page_url" : "" 74 | }, 75 | "use_host_network" : false, 76 | "volume_bindings" : [ 77 | { 78 | "host_volume_file" : "/docker/jd_scripts/logs", 79 | "mount_point" : "/scripts/logs", 80 | "type" : "rw" 81 | } 82 | ] 83 | } 84 | -------------------------------------------------------------------------------- /docker/example/multi.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | jd_scripts1: #默认 4 | image: akyakya/jd_scripts 5 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过 0.2(单核的20%) 6 | # 经过实际测试,建议不低于200M 7 | # deploy: 8 | # resources: 9 | # limits: 10 | # cpus: '0.2' 11 | # memory: 200M 12 | restart: always 13 | container_name: jd_scripts1 14 | tty: true 15 | volumes: 16 | - ./logs1:/scripts/logs 17 | environment: 18 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 19 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 20 | - TG_USER_ID=12xxxx206 21 | # 互助助码等参数可自行增加,如下。 22 | # 京东种豆得豆 23 | # - PLANT_BEAN_SHARECODES= 24 | 25 | jd_scripts2: #默认 26 | image: akyakya/jd_scripts 27 | restart: always 28 | container_name: jd_scripts2 29 | tty: true 30 | volumes: 31 | - ./logs2:/scripts/logs 32 | environment: 33 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 34 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 35 | - TG_USER_ID=12xxxx206 36 | jd_scripts4: #自定义追加默认之后 37 | image: akyakya/jd_scripts 38 | restart: always 39 | container_name: jd_scripts4 40 | tty: true 41 | volumes: 42 | - ./logs4:/scripts/logs 43 | - ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh 44 | environment: 45 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 46 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 47 | - TG_USER_ID=12xxxx206 48 | - CUSTOM_LIST_FILE=my_crontab_list.sh 49 | jd_scripts5: #自定义覆盖默认 50 | image: akyakya/jd_scripts 51 | restart: always 52 | container_name: jd_scripts5 53 | tty: true 54 | volumes: 55 | - ./logs5:/scripts/logs 56 | - ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh 57 | environment: 58 | - JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5; 59 | - TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ 60 | - TG_USER_ID=12xxxx206 61 | - CUSTOM_LIST_FILE=my_crontab_list.sh 62 | - CUSTOM_LIST_MERGE_TYPE=overwrite 63 | -------------------------------------------------------------------------------- /docker/example/use-tg-bot.yml: -------------------------------------------------------------------------------- 1 | jd_scripts: 2 | image: akyakya/jd_scripts:supportbot 3 | # 配置服务器资源约束。此例子中服务被限制为使用内存不超过200M以及cpu不超过0.2(单核的20%) 4 | # deploy: 5 | # resources: 6 | # limits: 7 | # cpus: '0.2' 8 | # memory: 200M 9 | container_name: jd_scripts 10 | restart: always 11 | volumes: 12 | - ./logs:/scripts/logs 13 | tty: true 14 | environment: 15 | # 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除 16 | #jd cookies 17 | # 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX 18 | - JD_COOKIE= 19 | #微信server酱通 20 | - PUSH_KEY= 21 | #Bark App通知 22 | - BARK_PUSH= 23 | #telegram机器人通知 24 | - TG_BOT_TOKEN= 25 | - TG_USER_ID= 26 | #钉钉机器人通知 27 | - DD_BOT_TOKEN= 28 | - DD_BOT_SECRET= 29 | #京东种豆得豆 30 | - PLANT_BEAN_SHARECODES= 31 | #京东农场 32 | # 例: FRUITSHARECODES=京东农场的互助码 33 | - FRUITSHARECODES= 34 | #京东萌宠 35 | # 例: PETSHARECODES=东东萌宠的互助码 36 | - PETSHARECODES= 37 | # 宠汪汪的喂食数量 38 | - JOY_FEED_COUNT= 39 | #京小超 40 | # - SUPERMARKET_SHARECODES= 41 | #兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字) 42 | # 例: MARKET_COIN_TO_BEANS=1000 43 | - MARKET_COIN_TO_BEANS= 44 | #是否开启debug模式打印日志 45 | # 例: JD_DEBUG=false 46 | - JD_DEBUG= 47 | -------------------------------------------------------------------------------- /docker/jd_scripts.my_crontab_list.syno.json: -------------------------------------------------------------------------------- 1 | { 2 | "cap_add" : [], 3 | "cap_drop" : [], 4 | "cmd" : "/bin/sh -c 'crontab /scripts/docker/my_crontab_list.sh && crond && node'", 5 | "cpu_priority" : 50, 6 | "devices" : null, 7 | "enable_publish_all_ports" : false, 8 | "enable_restart_policy" : true, 9 | "enabled" : true, 10 | "env_variables" : [ 11 | { 12 | "key" : "PATH", 13 | "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 14 | }, 15 | { 16 | "key" : "CDN_JD_DAILYBONUS", 17 | "value" : "true" 18 | }, 19 | { 20 | "key" : "JD_COOKIE", 21 | "value" : "pt_key=xxx;pt_pin=xxx;" 22 | }, 23 | { 24 | "key" : "PUSH_KEY", 25 | "value" : "" 26 | }, 27 | { 28 | "key" : "CRONTAB_LIST_FILE", 29 | "value" : "my_crontab_list.sh" 30 | } 31 | ], 32 | "exporting" : false, 33 | "id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c", 34 | "image" : "akyakya/jd_scripts", 35 | "is_ddsm" : false, 36 | "is_package" : false, 37 | "links" : [], 38 | "memory_limit" : 0, 39 | "name" : "jd_scripts", 40 | "network" : [ 41 | { 42 | "driver" : "bridge", 43 | "name" : "bridge" 44 | } 45 | ], 46 | "network_mode" : "default", 47 | "port_bindings" : [], 48 | "privileged" : false, 49 | "shortcut" : { 50 | "enable_shortcut" : false 51 | }, 52 | "use_host_network" : false, 53 | "volume_bindings" : [ 54 | { 55 | "host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh", 56 | "mount_point" : "/scripts/docker/my_crontab_list.sh", 57 | "type" : "rw" 58 | }, 59 | { 60 | "host_volume_file" : "/docker/jd_scripts/logs", 61 | "mount_point" : "/scripts/logs", 62 | "type" : "rw" 63 | } 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /docker/jd_scripts.syno.json: -------------------------------------------------------------------------------- 1 | { 2 | "cap_add" : null, 3 | "cap_drop" : null, 4 | "cmd" : "/bin/sh -c 'crond && node'", 5 | "cpu_priority" : 0, 6 | "devices" : null, 7 | "enable_publish_all_ports" : false, 8 | "enable_restart_policy" : true, 9 | "enabled" : false, 10 | "env_variables" : [ 11 | { 12 | "key" : "PATH", 13 | "value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" 14 | }, 15 | { 16 | "key" : "CDN_JD_DAILYBONUS", 17 | "value" : "true" 18 | }, 19 | { 20 | "key" : "JD_COOKIE", 21 | "value" : "pt_key=AAJfjaNrADASxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxx5;" 22 | }, 23 | { 24 | "key" : "TG_BOT_TOKEN", 25 | "value" : "13xxxxxx80:AAEkNxxxxxxzNf91WQ" 26 | }, 27 | { 28 | "key" : "TG_USER_ID", 29 | "value" : "12xxxx206" 30 | }, 31 | { 32 | "key" : "PLANT_BEAN_SHARECODES", 33 | "value" : "" 34 | }, 35 | { 36 | "key" : "FRUITSHARECODES", 37 | "value" : "" 38 | }, 39 | { 40 | "key" : "PETSHARECODES", 41 | "value" : "" 42 | }, 43 | { 44 | "key" : "SUPERMARKET_SHARECODES", 45 | "value" : "" 46 | }, 47 | { 48 | "key" : "CRONTAB_LIST_FILE", 49 | "value" : "crontab_list.sh" 50 | } 51 | ], 52 | "exporting" : false, 53 | "id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5", 54 | "image" : "akyakya/jd_scripts", 55 | "is_ddsm" : false, 56 | "is_package" : false, 57 | "links" : [], 58 | "memory_limit" : 0, 59 | "name" : "jd_scripts", 60 | "network" : [ 61 | { 62 | "driver" : "bridge", 63 | "name" : "bridge" 64 | } 65 | ], 66 | "network_mode" : "default", 67 | "port_bindings" : [], 68 | "privileged" : false, 69 | "shortcut" : { 70 | "enable_shortcut" : false, 71 | "enable_status_page" : false, 72 | "enable_web_page" : false, 73 | "web_page_url" : "" 74 | }, 75 | "use_host_network" : false, 76 | "volume_bindings" : [ 77 | { 78 | "host_volume_file" : "/docker/jd_scripts/logs", 79 | "mount_point" : "/scripts/logs", 80 | "type" : "rw" 81 | } 82 | ] 83 | } 84 | -------------------------------------------------------------------------------- /docker/notify_docker_user.js: -------------------------------------------------------------------------------- 1 | const notify = require('../sendNotify'); 2 | 3 | function image_update_notify() { 4 | if (process.env.NOTIFY_CONTENT) { 5 | notify.sendNotify("⚠️Docker镜像版本更新通知⚠️", process.env.NOTIFY_CONTENT) 6 | } 7 | } 8 | 9 | image_update_notify(); -------------------------------------------------------------------------------- /iCloud.md: -------------------------------------------------------------------------------- 1 | ## 1.安装 Node.js 环境 2 | 3 | [下载地址](https://nodejs.org/zh-tw/download/ ) 4 | 5 | 根据自己的操作系统下载 6 | 7 | 傻瓜式安装,一直下一步即可。 8 | 9 | 10 | 11 | ## 2.下载源码 12 | 13 | ![BclSld.png](https://s1.ax1x.com/2020/11/04/BclSld.png) 14 | 15 | 点击红框处下载压缩包 16 | 17 | ## 3.安装依赖、增加入口文件、增加cookie 18 | 19 | 压缩包解压后进入项目文件夹 20 | 21 | - Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口** 22 | - Mac 用户通过终端,自行进入该文件夹 23 | 24 | 在命令行内输入 `npm i `,等待运行完成。 25 | 26 | 此时,项目文件夹内会多出一个 `node_modules`文件夹 27 | 28 | **增加入口文件** 29 | 30 | 方案一:同一个仓库下同一个时间,执行多个脚本 31 | 32 | 在项目文件夹内新建 `index.js` 33 | 34 | 编辑文件 35 | 36 | ```javascript 37 | 'use strict'; 38 | exports.main_handler = async (event, context, callback) => { 39 | //解决云函数热启动问题 40 | delete require.cache[require.resolve('./jd_xtg1.js')]; 41 | require('./jd_xtg1.js') //这里写你想要的脚本 42 | require('./jd_xtg2.js') //这里写你想要的脚本 43 | require('./jd_xtg3.js') //这里写你想要的脚本 44 | } 45 | 46 | ``` 47 | 此时,同一时间点下,会同时执行多个脚本,触发器触发后,index.js文件中require()下的所有脚本都会被执行 48 | 49 | **优点**:同一时间下可以同时执行多个脚本,适合脚本种类少的repository,对脚本数量少的repository推荐使用此方案
**缺点**:多个脚本不同时间点运行无法满足 50 | 51 | 方案二:同一个仓库下不同的时间点,分别执行不同的脚本(类似GitHub Action执行机制) 52 | 53 | 在项目文件夹内新建 `index.js` 54 | 55 | 编辑文件 56 | 57 | ```javascript 58 | 'use strict'; 59 | exports.main_handler = async (event, context, callback) => { 60 | for (const v of event["Message"].split("\r\n")) { 61 | //解决云函数热启动问题 62 | delete require.cache[require.resolve(`./${v}.js`)]; 63 | console.log(v); 64 | require(`./${v}.js`) 65 | } 66 | } 67 | 68 | ``` 69 | 70 | 此时触发管理按照下图中进行设置,附加信息选择“是”,内容填写需要传递执行的具体脚本文件名,以回车键换行。触发器触发后,附加信息栏内的脚本会被执行,设置多个不同时间点的触发器达到类似GitHub Action的效果 71 | 72 | **优点**:可以满足个性化需求,同一个repository下只需要设置不同的触发器,可以实现不同时间点分别执行不同的脚本
**缺点**:repository下脚本过多,如果需要设置多个触发器,实现个性化运行效果,由于云函数的限制,最多只能设置10个 73 | 74 | [![B20KxI.png](https://s1.ax1x.com/2020/11/05/B20KxI.png)](https://imgchr.com/i/B20KxI) 75 | [![BRCG0H.png](https://s1.ax1x.com/2020/11/05/BRCG0H.png)](https://imgchr.com/i/BRCG0H) 76 | 77 | **注意:**
78 | Ⅰ方案一与方案二不能混合到同一个index.js文件中使用,同一个仓库下,二者只能选择其一。
79 | Ⅱ感谢[issues#115](https://github.com/lxk0301/jd_scripts/issues/115)中的解决方案,目前云函数连续测试已经可以规避热启动问题了。
80 | Ⅲ在确保完全按照本教程设置的情况下测试云函数运行情况,对于部分人运行日志中出现某些脚本运行失败其他正常,并且错误提示带有strict字样的,请自行删除index.js中的```'use strict';```,再做测试
81 | 82 | **增加cookie** 83 | 84 | 打开项目文件内的 `jdCookie.js` 85 | 86 | 在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔 87 | 88 | 例如 89 | 90 | ```javascript 91 | let CookieJDs = [ 92 | 'pt_key=xxx;pt_pin=xxx;', 93 | 'pt_key=zzz;pt_pin=zzz;', 94 | 'pt_key=aaa;pt_pin=xxxaaa' 95 | ] 96 | ``` 97 | 98 | 99 | 100 | ## 4.上传至腾讯云 101 | 102 | [腾讯云函数地址]( https://console.cloud.tencent.com/scf/index ) 103 | 104 | 编写函数 105 | 106 | 登录后,点击管理控制台 107 | 108 | 单击左侧导航栏**函数服务**,进入“函数服务”页面。 109 | 在页面上方选择一个地域,最好选择离你常用地区近点的,不至于导致账号异常。单击**新建**。如下图所示: 110 | 111 | ![iCloud1](./icon/iCloud1.png) 112 | 113 | 在“新建函数”页面填写函数基础信息,单击**下一步**。如下图所示: 114 | 115 | ![iCloud2](./icon/iCloud2.png) 116 | 117 | **函数名称**:可以自定义,比如为jd。
**运行环境**:选择 “Nodejs 12.16”。
**创建方式**:选择 “空白函数”。 118 | 119 | 确保环境为Nodejs 12.16,执行方法改为:index.main_handler,提交方式建议选本地文件夹,然后从GitHub项目克隆Zip压缩包,解压成文件夹,然后点击这个上传把文件夹上传进来(记得node_modules文件夹一并上传或者将node_modules文件夹上传到“层”,之后选择“函数管理”-“层管理”绑定上传好的层),完了后点击下面的高级设置。 120 | 121 | ![iCloud3](./icon/iCloud3.png) 122 | 123 | 内存用不了太大,64MB就够了(64M内存,免费时长6,400,000秒,内存与免费时长大致关系可以参看云函数官方说明),超时时间改为最大的900秒,然后点击最下面的完成。 124 | 125 | ![iCloud4](./icon/iCloud4.png) 126 | 127 | ## 5.设置触发器 128 | 129 | 点击刚创建的函数 130 | 131 | ![BcGa8O.png](https://s1.ax1x.com/2020/11/04/BcGa8O.png) 132 | 133 | 点击如图所示 134 | 135 | ![BcGvM4.png](https://s1.ax1x.com/2020/11/04/BcGvM4.png) 136 | 137 | 创建触发器 138 | 139 | ![iCloud6](./icon/iCloud6.png) 140 | 141 | 触发方式默认“**定时触发**”,定时任务名称随便起个名字,触发周期根据自己需要自行设置。 142 | 143 | 想进阶使用触发器的自行查看本文中方案一和方案二中的说明 144 | 145 | 关于触发周期中的自定义触发周期,使用的是 Cron表达式,这个自行学习下吧 146 | 147 | 148 | [Corn文档](https://cloud.tencent.com/document/product/583/9708#cron-.E8.A1.A8.E8.BE.BE.E5.BC.8F) 149 | 150 | 目前repo中按照每个脚本一个定时器的方式设置到云函数中,大约需要触发器10多个,由于云函数触发器限制最多10个,需要对触发器进行整合,整合后触发器保持在10个以内,以下设置仅供参考
151 | 152 | ![iCloud5](./icon/iCloud5.png) 153 | 154 | 点击提交,所有流程就结束了。 155 | -------------------------------------------------------------------------------- /icon/DD_bot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/DD_bot.png -------------------------------------------------------------------------------- /icon/Snipaste_2020-08-28_09-31-42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/Snipaste_2020-08-28_09-31-42.png -------------------------------------------------------------------------------- /icon/TG_PUSH1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/TG_PUSH1.png -------------------------------------------------------------------------------- /icon/TG_PUSH2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/TG_PUSH2.png -------------------------------------------------------------------------------- /icon/TG_PUSH3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/TG_PUSH3.png -------------------------------------------------------------------------------- /icon/action1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/action1.png -------------------------------------------------------------------------------- /icon/action2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/action2.png -------------------------------------------------------------------------------- /icon/action3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/action3.png -------------------------------------------------------------------------------- /icon/bark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/bark.jpg -------------------------------------------------------------------------------- /icon/bean_sign_simple.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/bean_sign_simple.jpg -------------------------------------------------------------------------------- /icon/disable-action.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/disable-action.jpg -------------------------------------------------------------------------------- /icon/fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/fork.png -------------------------------------------------------------------------------- /icon/git1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git1.jpg -------------------------------------------------------------------------------- /icon/git10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git10.jpg -------------------------------------------------------------------------------- /icon/git11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git11.jpg -------------------------------------------------------------------------------- /icon/git12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git12.jpg -------------------------------------------------------------------------------- /icon/git13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git13.jpg -------------------------------------------------------------------------------- /icon/git14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git14.jpg -------------------------------------------------------------------------------- /icon/git2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git2.jpg -------------------------------------------------------------------------------- /icon/git3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git3.jpg -------------------------------------------------------------------------------- /icon/git4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git4.jpg -------------------------------------------------------------------------------- /icon/git5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git5.jpg -------------------------------------------------------------------------------- /icon/git6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git6.jpg -------------------------------------------------------------------------------- /icon/git7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git7.png -------------------------------------------------------------------------------- /icon/git8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git8.jpg -------------------------------------------------------------------------------- /icon/git9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/git9.jpg -------------------------------------------------------------------------------- /icon/iCloud1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud1.png -------------------------------------------------------------------------------- /icon/iCloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud2.png -------------------------------------------------------------------------------- /icon/iCloud3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud3.png -------------------------------------------------------------------------------- /icon/iCloud4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud4.png -------------------------------------------------------------------------------- /icon/iCloud5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud5.png -------------------------------------------------------------------------------- /icon/iCloud6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/iCloud6.png -------------------------------------------------------------------------------- /icon/jd1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd1.jpg -------------------------------------------------------------------------------- /icon/jd2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd2.jpg -------------------------------------------------------------------------------- /icon/jd3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd3.jpg -------------------------------------------------------------------------------- /icon/jd4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd4.jpg -------------------------------------------------------------------------------- /icon/jd5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd5.png -------------------------------------------------------------------------------- /icon/jd6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd6.png -------------------------------------------------------------------------------- /icon/jd7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd7.png -------------------------------------------------------------------------------- /icon/jd8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd8.png -------------------------------------------------------------------------------- /icon/jd_moneyTree.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd_moneyTree.png -------------------------------------------------------------------------------- /icon/jd_pet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/jd_pet.png -------------------------------------------------------------------------------- /icon/thanks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/thanks.jpg -------------------------------------------------------------------------------- /icon/txy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zerokos/JD/fad175157936e5d3ef92ddc5b6b246e207dc5ec1/icon/txy.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | //'use strict'; 2 | exports.main_handler = async (event, context, callback) => { 3 | try { 4 | //如果想在一个定时触发器里面执行多个js文件需要在定时触发器的【附加信息】里面填写对应的名称,用 & 链接 5 | //例如我想一个定时触发器里执行jd_speed.js和jd_bean_change.js,在定时触发器的【附加信息】里面就填写 jd_speed&jd_bean_change 6 | for (const v of event["Message"].split("&")) { 7 | console.log(v); 8 | var request = require('request'); 9 | //1.执行自己上传的js文件 10 | //delete require.cache[require.resolve('./'+v+'.js')]; 11 | //require('./'+v+'.js') 12 | 13 | //2.执行国内gitee远端js文件如果部署,在国内节点,选择1或2的方式 14 | //request('https://gitee.com/lxk0301/jd_scripts/raw/master/'+v+'.js', function (error, response, body) { 15 | // eval(response.body) 16 | //}) 17 | 18 | //3.执行github远端的js文件(因github的raw类型的文件被墙,此方法云函数不推荐) 19 | request('https://raw.githubusercontent.com/lxk0301/jd_scripts/master/' + v + '.js', function (error, response, body) { 20 | eval(response.body) 21 | }) 22 | } 23 | } catch (e) { 24 | console.error(e) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /jdCookie.js: -------------------------------------------------------------------------------- 1 | /* 2 | 此文件为Node.js专用。其他用户请忽略 3 | */ 4 | //此处填写京东账号cookie。 5 | //注:github action用户cookie填写到Settings-Secrets里面,新增JD_COOKIE,多个账号的cookie使用`&`隔开或者换行 6 | let CookieJDs = [ 7 | '',//账号一ck,例:pt_key=XXX;pt_pin=XXX; 8 | '',//账号二ck,例:pt_key=XXX;pt_pin=XXX;如有更多,依次类推 9 | ] 10 | // 判断github action里面是否有京东ck 11 | if (process.env.JD_COOKIE) { 12 | if (process.env.JD_COOKIE.indexOf('&') > -1) { 13 | console.log(`您的cookie选择的是用&隔开\n`) 14 | CookieJDs = process.env.JD_COOKIE.split('&'); 15 | } else if (process.env.JD_COOKIE.indexOf('\n') > -1) { 16 | console.log(`您的cookie选择的是用换行隔开\n`) 17 | CookieJDs = process.env.JD_COOKIE.split('\n'); 18 | } else if (process.env.JD_COOKIE.indexOf('\\n') > -1) { 19 | //环境变量兼容腾讯云和docker下\n会被转义成\\n 20 | console.log(`您的cookie选择的是用换行隔开\\n`) 21 | CookieJDs = process.env.JD_COOKIE.split('\\n'); 22 | } else { 23 | CookieJDs = [process.env.JD_COOKIE]; 24 | } 25 | CookieJDs = [...new Set(CookieJDs)] 26 | console.log(`\n====================共有${CookieJDs.length}个京东账号Cookie=========\n`); 27 | console.log(`==================脚本执行- 北京时间(UTC+8):${new Date(new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000).toLocaleString()}=====================\n`) 28 | // console.log(`\n==================脚本执行来自 github action=====================\n`) 29 | } 30 | for (let i = 0; i < CookieJDs.length; i++) { 31 | const index = (i + 1 === 1) ? '' : (i + 1); 32 | exports['CookieJD' + index] = CookieJDs[i]; 33 | } 34 | -------------------------------------------------------------------------------- /jdDreamFactoryShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 京喜工厂互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 DREAM_FACTORY_SHARE_CODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let shareCodes = [ 11 | 'V5LkjP4WRyjeCKR9VRwcRX0bBuTz7MEK0-E99EJ7u0k=@Bo-jnVs_m9uBvbRzraXcSA==@-OvElMzqeyeGBWazWYjI1Q==',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | '1uzRU5HkaUgvy0AB5Q9VUg==@PDPM257r_KuQhil2Y7koNw==@-OvElMzqeyeGBWazWYjI1Q==',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有东东萌宠互助码 15 | if (process.env.DREAM_FACTORY_SHARE_CODES) { 16 | if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('&') > -1) { 17 | console.log(`您的互助码选择的是用&隔开\n`) 18 | shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('&'); 19 | } else if (process.env.DREAM_FACTORY_SHARE_CODES.indexOf('\n') > -1) { 20 | console.log(`您的互助码选择的是用换行隔开\n`) 21 | shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split('\n'); 22 | } else { 23 | shareCodes = process.env.DREAM_FACTORY_SHARE_CODES.split(); 24 | } 25 | } else if (process.env.DREAM_FACTORY_SHARE_CODES) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < shareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['shareCodes' + index] = shareCodes[i]; 31 | } -------------------------------------------------------------------------------- /jdFactoryShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 东东工厂互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let shareCodes = [ 11 | '',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | '',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有东东工厂互助码 15 | if (process.env.DDFACTORY_SHARECODES) { 16 | if (process.env.DDFACTORY_SHARECODES.indexOf('&') > -1) { 17 | console.log(`您的互助码选择的是用&隔开\n`) 18 | shareCodes = process.env.DDFACTORY_SHARECODES.split('&'); 19 | } else if (process.env.DDFACTORY_SHARECODES.indexOf('\n') > -1) { 20 | console.log(`您的互助码选择的是用换行隔开\n`) 21 | shareCodes = process.env.DDFACTORY_SHARECODES.split('\n'); 22 | } else { 23 | shareCodes = process.env.DDFACTORY_SHARECODES.split(); 24 | } 25 | } else if (process.env.DDFACTORY_SHARECODES) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < shareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['shareCodes' + index] = shareCodes[i]; 31 | } -------------------------------------------------------------------------------- /jdFruitShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 水果互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等NOde.js用户在此处填写京东东农场的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 FruitShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let FruitShareCodes = [ 11 | '0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3@6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@56db8e7bc5874668ba7d5195230d067a',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | '6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6@9c52670d52ad4e1a812f894563c746ea@8175509d82504e96828afc8b1bbb9cb3',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有水果互助码 15 | if (process.env.FRUITSHARECODES) { 16 | if (process.env.FRUITSHARECODES.indexOf('&') > -1) { 17 | console.log(`您的东东农场互助码选择的是用&隔开\n`) 18 | FruitShareCodes = process.env.FRUITSHARECODES.split('&'); 19 | } else if (process.env.FRUITSHARECODES.indexOf('\n') > -1) { 20 | console.log(`您的东东农场互助码选择的是用换行隔开\n`) 21 | FruitShareCodes = process.env.FRUITSHARECODES.split('\n'); 22 | } else { 23 | FruitShareCodes = process.env.FRUITSHARECODES.split(); 24 | } 25 | } else if (process.env.JD_COOKIE) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < FruitShareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['FruitShareCode' + index] = FruitShareCodes[i]; 31 | } 32 | -------------------------------------------------------------------------------- /jdJxStoryShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 京喜故事互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等Node.js用户在此处填写京喜故事的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 JXSTORY_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let shareCodes = [ 11 | '',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | '',//账号二的好友shareCode 13 | ] 14 | // 判断github action里面是否有京喜故事互助码 15 | if (process.env.JXSTORY_SHARECODES) {if (process.env.JXSTORY_SHARECODES.indexOf('&') > -1) { 16 | console.log(`您的互助码选择的是用&隔开\n`) 17 | shareCodes = process.env.JXSTORY_SHARECODES.split('&'); 18 | } else if (process.env.JXSTORY_SHARECODES.indexOf('\n') > -1) { 19 | console.log(`您的互助码选择的是用换行隔开\n`) 20 | shareCodes = process.env.JXSTORY_SHARECODES.split('\n'); 21 | } else { 22 | shareCodes = process.env.JXSTORY_SHARECODES.split(); 23 | } 24 | } else if (process.env.JXSTORY_SHARECODES) { 25 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 26 | } 27 | for (let i = 0; i < shareCodes.length; i++) { 28 | const index = (i + 1 === 1) ? '' : (i + 1); 29 | exports['shareCodes' + index] = shareCodes[i]; 30 | } 31 | -------------------------------------------------------------------------------- /jdPetShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 东东萌宠互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PetShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let PetShareCodes = [ 11 | 'MTAxODc2NTEzNTAwMDAwMDAwMjg3MDg2MA==@MTAxODc2NTEzMzAwMDAwMDAyNzUwMDA4MQ==@MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODc2NTEzNDAwMDAwMDAzMDI2MDI4MQ==',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | 'MTAxODc2NTEzMjAwMDAwMDAzMDI3MTMyOQ==@MTAxODcxOTI2NTAwMDAwMDAyNjA4ODQyMQ==@MTAxODc2NTEzOTAwMDAwMDAyNzE2MDY2NQ==',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有东东萌宠互助码 15 | if (process.env.PETSHARECODES) { 16 | if (process.env.PETSHARECODES.indexOf('&') > -1) { 17 | console.log(`您的东东萌宠互助码选择的是用&隔开\n`) 18 | PetShareCodes = process.env.PETSHARECODES.split('&'); 19 | } else if (process.env.PETSHARECODES.indexOf('\n') > -1) { 20 | console.log(`您的东东萌宠互助码选择的是用换行隔开\n`) 21 | PetShareCodes = process.env.PETSHARECODES.split('\n'); 22 | } else { 23 | PetShareCodes = process.env.PETSHARECODES.split(); 24 | } 25 | } else if (process.env.JD_COOKIE) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < PetShareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['PetShareCode' + index] = PetShareCodes[i]; 31 | } -------------------------------------------------------------------------------- /jdPlantBeanShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 京东种豆得豆互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等NOde.js用户在此处填写东东萌宠的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 PLANT_BEAN_SHARECODES(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let PlantBeanShareCodes = [ 11 | '66j4yt3ebl5ierjljoszp7e4izzbzaqhi5k2unz2afwlyqsgnasq@olmijoxgmjutyrsovl2xalt2tbtfmg6sqldcb3q@e7lhibzb3zek27amgsvywffxx7hxgtzstrk2lba@olmijoxgmjutyx55upqaqxrblt7f3h26dgj2riy',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | '4npkonnsy7xi3p6pjfxg6ct5gll42gmvnz7zgoy@6dygkptofggtp6ffhbowku3xgu@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy@mlrdw3aw26j3wgzjipsxgonaoyr2evrdsifsziy',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有东东萌宠互助码 15 | if (process.env.PLANT_BEAN_SHARECODES) { 16 | if (process.env.PLANT_BEAN_SHARECODES.indexOf('&') > -1) { 17 | console.log(`您的种豆互助码选择的是用&隔开\n`) 18 | PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('&'); 19 | } else if (process.env.PLANT_BEAN_SHARECODES.indexOf('\n') > -1) { 20 | console.log(`您的种豆互助码选择的是用换行隔开\n`) 21 | PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split('\n'); 22 | } else { 23 | PlantBeanShareCodes = process.env.PLANT_BEAN_SHARECODES.split(); 24 | } 25 | } else if (process.env.JD_COOKIE) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < PlantBeanShareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['PlantBeanShareCodes' + index] = PlantBeanShareCodes[i]; 31 | } -------------------------------------------------------------------------------- /jdSuperMarketShareCodes.js: -------------------------------------------------------------------------------- 1 | /* 2 | 京小超互助码 3 | 此文件为Node.js专用。其他用户请忽略 4 | 支持京东N个账号 5 | */ 6 | //云服务器腾讯云函数等Node.js用户在此处填写京小超商圈的好友码。 7 | // github action用户的好友互助码填写到Action->Settings->Secrets->new Secret里面(Name填写 SuperMarketShareCodes(此处的Name必须按此来写,不能随意更改),内容处填写互助码,填写规则如下) 8 | // 同一个京东账号的好友互助码用@符号隔开,不同京东账号之间用&符号或者换行隔开,下面给一个示例 9 | // 如: 京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2 10 | let SuperMarketShareCodes = [ 11 | '-4msulYas0O2JsRhE-2TA5XZmBQ@eU9Yar_mb_9z92_WmXNG0w@eU9YaejjYv4g8T2EwnsVhQ',//账号一的好友shareCode,不同好友中间用@符号隔开 12 | 'aURoM7PtY_Q@eU9Ya-y2N_5z9DvXwyIV0A@eU9YaOnjYK4j-GvWmXIWhA',//账号二的好友shareCode,不同好友中间用@符号隔开 13 | ] 14 | // 判断github action里面是否有京小超商圈互助码 15 | if (process.env.SUPERMARKET_SHARECODES) { 16 | if (process.env.SUPERMARKET_SHARECODES.indexOf('&') > -1) { 17 | console.log(`您的京小超商圈互助码选择的是用&隔开\n`) 18 | SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split('&'); 19 | } else if (process.env.SUPERMARKET_SHARECODES.indexOf('\n') > -1) { 20 | console.log(`您的京小超商圈互助码选择的是用换行隔开\n`) 21 | SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split('\n'); 22 | } else { 23 | SuperMarketShareCodes = process.env.SUPERMARKET_SHARECODES.split(); 24 | } 25 | } else if (process.env.JD_COOKIE) { 26 | console.log(`由于您secret里面未提供助力码,故此处运行将会给脚本内置的码进行助力,请知晓!`) 27 | } 28 | for (let i = 0; i < SuperMarketShareCodes.length; i++) { 29 | const index = (i + 1 === 1) ? '' : (i + 1); 30 | exports['SuperMarketShareCode' + index] = SuperMarketShareCodes[i]; 31 | } -------------------------------------------------------------------------------- /jd_joy_help.js: -------------------------------------------------------------------------------- 1 | /** 2 | 宠汪汪强制为别人助力(助力一个好友你自己可以获得30积分,一天上限是帮助3个好友,自己获得90积分,不管助力是否成功,对方都会成为你的好友) 3 | 更新地址:https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_help.js 4 | 更新时间:2020-11-12 5 | 目前提供了304位好友的friendPin供使用。脚本随机从里面获取一个,助力成功后,退出小程序重新点击进去开始助力新的好友 6 | 欢迎大家使用 https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 (currentPage=1表示第一页好友,=2表示第二页好友) 7 | 提供各自账号列表的friendPin给我 8 | 如果想设置固定好友,那下载下来放到本地使用,可以修改friendPin换好友(助力一好友后,更换一次friendPin里面的内容) 9 | 感谢github @Zero-S1提供 10 | 使用方法: 11 | ①设置好相应软件的重写 12 | ②从京东APP宠汪汪->领狗粮->邀请好友助力,分享给你小号微信或者微信的文件传输助手。 自己再打开刚才的分享,助力成功后,返回到此小程序首页重新进去宠汪汪即可助力下一位好友 13 | ③如提示好友人气旺,说明此好友已满了三人助力,需重新进出小程序,重新进入来客有礼-宠汪汪。 14 | [MITM] 15 | hostname = draw.jdfcloud.com 16 | ======================Surge===================== 17 | [Script] 18 | 宠汪汪强制为别人助力= 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 19 | 20 | ===================圈x===================== 21 | [rewrite_local] 22 | ^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 23 | 24 | =====================LOON===================== 25 | [Script] 26 | 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=宠汪汪强制为别人助力 27 | 28 | 29 | 你也可从下面链接拿好友的friendPin(复制链接到有京东ck的浏览器打开即可) 30 | 31 | https://jdjoy.jd.com/pet/getFriends?itemsPerPage=20¤tPage=1 32 | **/ 33 | let url = $request.url 34 | 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"] 35 | //随机生成m(小)到n(大)的数,包含m和n 36 | function randomFriendPin(m,n) { 37 | return Math.round(Math.random()*(n - m) + m); 38 | } 39 | let friendPin = friendsArr[randomFriendPin(0, friendsArr.length - 1)] //强制为对方助力,可成为好友关系 40 | friendPin = encodeURI(friendPin); 41 | const timestamp = new Date().getTime() 42 | newUrl = url.replace(/friendPin=.*?$/i, "friendPin=" + friendPin).replace(/invitePin=.*?$/i, "invitePin=" + friendPin).replace(/inviteTimeStamp=.*?$/i, "inviteTimeStamp=" + timestamp + "&") 43 | console.log(newUrl) 44 | $done({ url: newUrl }) 45 | -------------------------------------------------------------------------------- /jd_petTreasureBox.js: -------------------------------------------------------------------------------- 1 | /** 2 | 更新时间:2020-11-12 3 | 从github@Zero-S1搬的[https://github.com/Zero-S1/JD_tools/blob/master/jbp.js] 4 | 【宠汪汪聚宝盆辅助脚本】 5 | 1、进入聚宝盆,显示本轮狗粮池投入总数,方便估算 6 | 2、可能有两位数误差,影响不大 7 | 3、聚宝盆最下方显示上轮前六名的投入狗粮,收入积分,以及纯收益(即:收入积分 - 投入狗粮) 8 | [MITM] 9 | hostname = jdjoy.jd.com,draw.jdfcloud.com 10 | 11 | surge 12 | [Script] 13 | 聚宝盆投狗粮辅助 = 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 14 | 15 | Qx 16 | [rewrite_local] 17 | ^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 18 | 19 | LOON: 20 | [Script] 21 | 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=聚宝盆投狗粮辅助 22 | 23 | **/ 24 | let body = $response.body 25 | body = JSON.parse(body) 26 | food = body['data']['food'] 27 | function f(v) { 28 | return (v < 0) ? v : `+${v}`; 29 | } 30 | var sum = 0 31 | lastHourWinInfos = body["data"]["lastHourWinInfos"] 32 | for (var i in lastHourWinInfos) { 33 | sum += lastHourWinInfos[i]["petCoin"] 34 | } 35 | for (var i in lastHourWinInfos) { 36 | body["data"]["lastHourWinInfos"][i]["petCoin"] = `{${lastHourWinInfos[i]["food"]}} [${lastHourWinInfos[i]["petCoin"]}] (${f(lastHourWinInfos[i]["petCoin"] - lastHourWinInfos[i]["food"])}) ` 37 | } 38 | 39 | body["data"]["lastHourWinInfos"].unshift({ 40 | 'pin': "", 41 | 'nickName': '', 42 | 'investHour': lastHourWinInfos[0]['investHour'], 43 | 'stage': '2', 44 | 'food': 0, 45 | 'rank': 0, 46 | 'foodDif': "", 47 | 'petCoin': '{投} [收入] (纯收入)', 48 | 'userTag': "", 49 | 'win': true 50 | }) 51 | lastTurnFood = parseInt(sum / 0.09 * 0.91) 52 | body['data']['food'] = `${food} (+${food - lastTurnFood})` 53 | body = JSON.stringify(body) 54 | $done({ body }) 55 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lxk0301", 3 | "version": "1.0.0", 4 | "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**}", 5 | "main": "AlipayManor.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/lxk0301/jd_scripts.git" 12 | }, 13 | "keywords": [ 14 | "京东薅羊毛工具, 京东水果、宠物、种豆等等" 15 | ], 16 | "author": "lxk0301", 17 | "license": "ISC", 18 | "dependencies": { 19 | "crypto-js": "^4.0.0", 20 | "got": "^11.5.1", 21 | "http-server": "^0.12.3", 22 | "tough-cookie": "^4.0.0", 23 | "download": "^8.0.0", 24 | "request": "^2.88.2", 25 | "tunnel": "0.0.6" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /serverless.yml: -------------------------------------------------------------------------------- 1 | # serverless.yml 2 | 3 | #组件信息 4 | component: scf # (必选) 组件名称,在该实例中为scf 5 | name: jdscript # (必选) 组件实例名称。 6 | 7 | #组件参数配置 8 | inputs: 9 | name: scf-${name} # 云函数名称,默认为 ${name}-${stage}-${app} 10 | enableRoleAuth: true # 默认会尝试创建 SCF_QcsRole 角色,如果不需要配置成 false 即可 11 | src: ./ 12 | handler: index.main_handler #入口 13 | runtime: Nodejs12.16 # 运行环境 默认 Nodejs10.15 14 | region: ap-hongkong # 函数所在区域 15 | description: This is a function in ${app} application. 16 | memorySize: 128 # 内存大小,单位MB 17 | timeout: 900 # 超时时间,单位秒 18 | events: # 触发器 19 | - timer: # 签到 20 | parameters: 21 | name: jd_bean_sign 22 | cronExpression: "0 0 0,7 * * * *" 23 | enable: true 24 | argument: jd_bean_sign 25 | - timer: # 京小超兑换奖品# 摇京豆 26 | parameters: 27 | name: jd_blueCoin_jd_club_lottery 28 | cronExpression: "0 0 0 * * * *" 29 | enable: true 30 | argument: jd_blueCoin&jd_club_lottery 31 | - timer: # 东东农场# 东东萌宠 32 | parameters: 33 | name: jd_fruit_jd_pet 34 | cronExpression: "0 5 6-18/6 * * * *" 35 | enable: true 36 | argument: jd_fruit&jd_pet 37 | - timer: # 宠汪汪喂食# 宠汪汪# 摇钱树# 京东种豆得豆# 京喜工厂 #东东工厂 38 | parameters: 39 | name: joy_feedPets_joy_moneyTree_plantBean_dreamFactory_jdfactory 40 | cronExpression: "0 3 */1 * * * *" 41 | enable: true 42 | argument: jd_joy_feedPets&jd_joy&jd_moneyTree&jd_plantBean&jd_dreamFactory&jd_jdfactory 43 | - timer: # 宠汪汪积分兑换奖品# 宠汪汪偷好友积分与狗# 点点券# 京东直播18豆 44 | parameters: 45 | name: joy_reward_joy_steal_necklace_live 46 | cronExpression: "0 0 0-16/8,20 * * * *" 47 | enable: true 48 | argument: jd_joy_reward&jd_joy_steal&jd_necklace&jd_live 49 | - timer: # 京东全民开红包 # 进店领豆 # 取关京东店铺商品# 京东抽奖机# 东东小窝# 秒杀红包雨# 健康抽奖机 50 | parameters: 51 | name: redPacket_shop_unsubscribe_lotteryMachine_small_home_ms_redrain_health 52 | cronExpression: "0 10 0 * * * *" 53 | enable: true 54 | argument: jd_redPacket&jd_shop&jd_unsubscribe&jd_lotteryMachine&jd_small_home&jd_ms_redrain&jd_health 55 | - timer: # 京东天天加速# 天天提鹅 56 | parameters: 57 | name: jd_speed_jd_daily_egg 58 | cronExpression: "0 8 */3 * * * *" 59 | enable: true 60 | argument: jd_speed&jd_daily_egg 61 | - timer: # 东东超市 62 | parameters: 63 | name: jd_superMarket 64 | cronExpression: "0 15 * * * * *" 65 | enable: true 66 | argument: jd_superMarket 67 | - timer: # 京豆变动通知 # 京东排行榜 # 领京豆额外奖励 # 京东汽车 #京东健康APP 68 | parameters: 69 | name: bean_change_rankingList_bean_home_car_jdh 70 | cronExpression: "0 30 7 * * * *" 71 | enable: true 72 | argument: jd_bean_change&jd_rankingList&jd_bean_home&jd_car&jd_jdh 73 | - timer: #金融养猪 #十元街 #京东快递 #发现-看一看 #京东赚赚 #金融打卡领年终奖 74 | parameters: 75 | name: pigPet_syj_kd_watch_jdzz_jr_sign 76 | cronExpression: "0 3 1 * * * *" 77 | enable: true 78 | argument: jd_pigPet&jd_syj&jd_kd&jd_watch&jd_jdzz&jr_sign 79 | environment: # 环境变量 80 | variables: # 环境变量对象 81 | AAA: BBB # 不要删除,用来格式化对齐追加的变量的 82 | -------------------------------------------------------------------------------- /tencentscf.md: -------------------------------------------------------------------------------- 1 | 2 | # 云函数快速部署京东脚本 3 | > 4 | > - 本地安装依赖使用serverless部署,[点这里](tencentscf.md#1-安装-nodejs-环境) 5 | > - Github Action 部署[点这里](tencentscf.md#github-action-部署) 6 | 7 | ## 1. 安装 Node.js 环境 8 | 9 | Node.js 环境 [下载地址](https://nodejs.org/zh-tw/download/) ,根据自己的操作系统下载和安装。 10 | 11 | ## 2. 下载代码 12 | 13 | 点击红框处下载压缩包 14 | ![下载代码](https://imgbed-bucket-1251971143.cos.ap-guangzhou.myqcloud.com/1605497672397-zip.png) 15 | 16 | ## 3. 安装依赖,配置 cookie 17 | 18 | ### 3.1 安装依赖 19 | 20 | 压缩包解压后进入项目文件夹 21 | 22 | - Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口** 23 | - Mac 用户通过终端,自行进入该文件夹 24 | 25 | 在命令行内输入 `npm i `,等待运行完成。 26 | 27 | 此时,项目文件夹内会多出一个 `node_modules`文件夹 28 | 29 | ### 3.2 配置 cookie 30 | 31 | 打开项目文件内的 `jdCookie.js` 32 | 33 | 在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔 34 | 35 | 例如 36 | 37 | ```javascript 38 | let CookieJDs = [ 39 | 'pt_key=xxx;pt_pin=xxx;', 40 | 'pt_key=zzz;pt_pin=zzz;', 41 | 'pt_key=aaa;pt_pin=xxxaaa' 42 | ] 43 | ``` 44 | 45 | > 注:获取京东 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) 46 | 47 | 48 | ## 4. 部署到云函数 49 | 50 | ### 4.1 开通服务 51 | 52 | 依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole** 53 | 54 | > 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。 55 | 56 | ### 4.2 工具部署 57 | 58 | 下载 Serverless 工具,快速部署函数 59 | ``` 60 | npm install -g serverless 61 | ``` 62 | 63 | 执行部署命令 64 | ``` 65 | serverless deploy 66 | ``` 67 | 68 | 如果已经配置了永久秘钥,则可以直接部署,如果没有,可以直接**微信扫码**登录腾讯云,并且授权部署。 69 | 70 | 过几秒后,查看输出,可以看到函数和定时触发器都已经配置完成。 71 | ``` 72 | serverless ⚡framework 73 | Action: "deploy" - Stage: "dev" - App: "jdscript" - Instance: "jdscript" 74 | 75 | functionName: scf-jdscript 76 | description: This is a function in jdscript application. 77 | namespace: default 78 | runtime: Nodejs12.16 79 | handler: index.main_handler 80 | memorySize: 64 81 | lastVersion: $LATEST 82 | traffic: 1 83 | triggers: 84 | timer: 85 | - timer-jdscript-dev 86 | 87 | 36s › jdscript › Success 88 | ``` 89 | 90 | ## 5. 查看和测试 91 | 92 | 登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。 93 | 94 | 在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。 95 | 96 | ![测试函数](https://user-images.githubusercontent.com/6993269/99628053-5a9eea80-2a70-11eb-906f-f1d5ea2bfa3a.png) 97 | 98 | > 如果需要配置永久秘钥,则可以在[访问秘钥页面](https://console.cloud.tencent.com/cam/capi)获取账号的 TENCENT_SECRET_ID,TENCENT_SECRET_KEY,并配置在代码根目录 .env 文件中。 99 | 100 | 101 | # Github Action 部署 102 | ## 1. 开通服务 103 | 104 | 依次登录 [SCF 云函数控制台](https://console.cloud.tencent.com/scf) 和 [SLS 控制台](https://console.cloud.tencent.com/sls) 开通相关服务,确保账户下已开通服务并创建相应[服务角色](https://console.cloud.tencent.com/cam/role) **SCF_QcsRole、SLS_QcsRole** 105 | 106 | > 注意!为了确保权限足够,获取这两个参数时不要使用子账户!此外,腾讯云账户需要[实名认证](https://console.cloud.tencent.com/developer/auth)。 107 | 108 | ## 2. 在这里新建一个访问密钥[新建密钥](https://console.cloud.tencent.com/cam/capi) 109 | > 将SecretId和SecretKey分别配置在仓库的secrets变量里面, TENCENT_SECRET_ID对应你的SecretId的值,TENCENT_SECRET_KEY对应你的SecretKey的值 110 | 111 | ## 3. 配置自己需要secrets变量[参考这里](githubAction.md#下方提供使用到的-secrets全集合) 112 | ### __重要的说三遍__ 113 | ### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 114 | ### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 115 | ### 如果涉及一个变量配置多个值,如多个cookie,多个取消订阅关键字,去掉里面的 *__[空格]()__* 和 __*[换行]()*__ 使用 `&` 连接 116 | > 排查问题第一步先看自己[腾讯云函数](https://console.cloud.tencent.com/scf/list-detail?rid=5&ns=default&id=scf-jdscript)那边的环境变量跟自己在仓库配置的 `secrets` 是否一致 117 | ![image](https://user-images.githubusercontent.com/6993269/99937191-06617680-2da0-11eb-99ea-033f2c655683.png) 118 | 119 | 120 | ## 4.执行action workflow进行部署,workflow未报错即部署成功 121 | ![image](https://user-images.githubusercontent.com/6993269/99513289-6a152980-29c5-11eb-9266-3f56ba13d3b2.png) 122 | ## 5. 查看和测试 123 | 登录后,在 [腾讯云函数地址](https://console.cloud.tencent.com/scf/index) 点击管理控制台,查看最新部署的函数。 124 | 125 | 在左侧栏的日志查询中,可以查看到触发的日志,包括是否打卡成功等。 126 | 127 | ![测试函数](https://user-images.githubusercontent.com/6993269/99628053-5a9eea80-2a70-11eb-906f-f1d5ea2bfa3a.png) 128 | ## 6. 设置触发器[看这里](iCloud.md#5设置触发器) 或者看这里的[注释说明](https://github.com/iouAkira/jd_scripts/blob/patch-1/index.js#L4) 129 | --------------------------------------------------------------------------------