first commit
6
.github/pull.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: "1"
|
||||
rules: # Array of rules
|
||||
- base: master # Required. Target branch
|
||||
upstream: lxk0301:master # Required. Must be in the same fork network.
|
||||
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
|
||||
mergeUnstable: true # Optional, merge pull request even when the mergeable_state is not clean. Default: false
|
43
.github/workflows/build_docker_image.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: 构建JD Scripts镜像
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- "docker/Dockerfile"
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
# 要去 https://hub.docker.com/ 那边注册一个账户然后配置用户名密码
|
||||
# - name: 构建并推送到Dockerhub官方镜像仓库
|
||||
# uses: docker/build-push-action@v1
|
||||
# with:
|
||||
# username: ${{ secrets.DOCKER_USERNAME }}
|
||||
# password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
# dockerfile: docker/Dockerfile
|
||||
# repository: akyakya/jd_scripts
|
||||
# tag_with_ref: true
|
||||
|
||||
- id: repo_name
|
||||
uses: ASzc/change-string-case-action@v1
|
||||
with:
|
||||
string: ${{ github.repository }}
|
||||
|
||||
- name: 构建并推送到Github Packages
|
||||
uses: docker/build-push-action@v1
|
||||
if: env.GITHUB_TOKEN
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
dockerfile: docker/Dockerfile
|
||||
registry: docker.pkg.github.com
|
||||
repository: ${{ steps.repo_name.outputs.lowercase }}/jd_scripts
|
||||
tag_with_ref: true
|
52
.github/workflows/jd_818.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_818
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 1,4,7,10,12,16,22 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: 818
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【手机狂欢城脚本】'
|
||||
run: |
|
||||
node jd_818.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
|
52
.github/workflows/jd_bean_change.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_bean_change
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 2 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: bean_change
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京豆变动通知】'
|
||||
run: |
|
||||
node jd_bean_change.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
|
54
.github/workflows/jd_bean_sign.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_bean_sign
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: bean_sgin
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京豆签到脚本】'
|
||||
run: |
|
||||
node jd_bean_sign.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
JD_BEAN_STOP: ${{secrets.JD_BEAN_STOP}} #自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长)
|
||||
JD_BEAN_SIGN_STOP_NOTIFY: ${{secrets.JD_BEAN_SIGN_STOP_NOTIFY}}
|
||||
JD_BEAN_SIGN_NOTIFY_SIMPLE: ${{secrets.JD_BEAN_SIGN_NOTIFY_SIMPLE}}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
53
.github/workflows/jd_blueCoin.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_blueCoin
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: blueCoin
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京小超兑换奖品】'
|
||||
run: |
|
||||
node jd_blueCoin.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
MARKET_COIN_TO_BEANS: ${{ secrets.MARKET_COIN_TO_BEANS }}
|
||||
MARKET_REWARD_NOTIFY: ${{ secrets.MARKET_REWARD_NOTIFY }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
51
.github/workflows/jd_club_lottery.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_club_lottery
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: club_lottery
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【摇京豆脚本】'
|
||||
run: |
|
||||
node jd_club_lottery.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_collectProduceScore.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_collectProduceScore
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 * * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: collectProduceScore
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京东全民营业领金币】'
|
||||
run: |
|
||||
node jd_collectProduceScore.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
|
52
.github/workflows/jd_daily_egg.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_daily_egg
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '10 */3 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: jd_daily_egg
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【天天提鹅】'
|
||||
run: |
|
||||
node jd_daily_egg.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
JD_818_SHAREID_NOTIFY: ${{ secrets.JD_818_SHAREID_NOTIFY }}
|
54
.github/workflows/jd_fruit.yml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_fruit
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '20 23,4,10 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: fruit
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【东东农场】'
|
||||
run: |
|
||||
node jd_fruit.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
FRUITSHARECODES: ${{ secrets.FRUITSHARECODES }}
|
||||
FRUIT_BEAN_CARD: ${{ secrets.FRUIT_BEAN_CARD }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
FRUIT_NOTIFY_CONTROL: ${{ secrets.FRUIT_NOTIFY_CONTROL }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
53
.github/workflows/jd_joy.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_joy
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0,1,4,10,15,16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: joy
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【宠汪汪】'
|
||||
run: |
|
||||
node jd_joy.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }}
|
||||
JOY_RUN_FLAG: ${{ secrets.JOY_RUN_FLAG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_joy_feedPets.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_joy_feedPets
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '*/20 */1 * * *'
|
||||
watch:
|
||||
types: [started]
|
||||
repository_dispatch:
|
||||
types: joy_feedPets
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【宠汪汪喂食脚本】'
|
||||
run: |
|
||||
node jd_joy_feedPets.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
JOY_FEED_COUNT: ${{ secrets.JOY_FEED_COUNT }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
53
.github/workflows/jd_joy_reward.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_joy_reward
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 0,4,8,16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: joy_reward
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【宠汪汪积分兑换京豆】'
|
||||
run: |
|
||||
node jd_joy_reward.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
JD_JOY_REWARD_NOTIFY: ${{ secrets.JD_JOY_REWARD_NOTIFY }}
|
||||
JD_JOY_REWARD_NAME: ${{ secrets.JD_JOY_REWARD_NAME }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_joy_steal.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_joy_steal
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16,22 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: joy_steal
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【宠汪汪偷好友狗粮与积分】'
|
||||
run: |
|
||||
node jd_joy_steal.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
JOY_HELP_FEED: ${{ secrets.JOY_HELP_FEED }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_lotteryMachine.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_lotteryMachine
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '11 17 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: jd_lotteryMachine
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京东抽奖机】'
|
||||
run: |
|
||||
node jd_lotteryMachine.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
|
51
.github/workflows/jd_moneyTree.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_moneyTree
|
||||
|
||||
on:
|
||||
|
||||
schedule:
|
||||
- cron: '40 */3 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: moneyTree
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京东摇钱树】'
|
||||
run: |
|
||||
node jd_moneyTree.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
53
.github/workflows/jd_pet.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_pet
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '35 23,4,10 * * *'
|
||||
watch:
|
||||
types: [started]
|
||||
repository_dispatch:
|
||||
types: pet
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【东东萌宠】'
|
||||
run: |
|
||||
node jd_pet.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
PETSHARECODES: ${{ secrets.PETSHARECODES }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
PET_NOTIFY_CONTROL: ${{ secrets.PET_NOTIFY_CONTROL }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_plantBean.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_plantBean
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 23,0-14/1 * * *' #此处为UTC-0时间
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: pantBean
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【种豆得豆】'
|
||||
run: |
|
||||
node jd_plantBean.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
PLANT_BEAN_SHARECODES: ${{ secrets.PLANT_BEAN_SHARECODES }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
52
.github/workflows/jd_rankingList.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_rankingList
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '11 18 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: jd_rankingList
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京东排行榜】'
|
||||
run: |
|
||||
node jd_rankingList.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
|
51
.github/workflows/jd_redPacket.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_redPacket
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 17 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: redPacket
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【全民开红包脚本】'
|
||||
run: |
|
||||
node jd_redPacket.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
51
.github/workflows/jd_shop.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_shop
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: shop
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【进店领豆脚本】'
|
||||
run: |
|
||||
node jd_shop.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
51
.github/workflows/jd_speed.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_speed
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '33 */3 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: speed
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【天天加速】'
|
||||
run: |
|
||||
node jd_speed.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
55
.github/workflows/jd_superMarket.yml
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_superMarket
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '15 * * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: superMarket
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京小超】'
|
||||
run: |
|
||||
node jd_superMarket.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
||||
jdSuperMarketUpgrade: ${{ secrets.SUPERMARKET_UPGRADE }}
|
||||
jdBusinessCircleJump: ${{ secrets.BUSINESS_CIRCLE_JUMP }}
|
||||
SUPERMARKET_SHARECODES: ${{ secrets.SUPERMARKET_SHARECODES }}
|
||||
jdSuperMarketLottery: ${{ secrets.SUPERMARKET_LOTTERY }}
|
52
.github/workflows/jd_unsubscribe.yml
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_unsubscribe
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '45 15 * * *'
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: unsubscribe
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【京东取关商品】'
|
||||
run: |
|
||||
node jd_unsubscribe.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
UN_SUBSCRIBES: ${{ secrets.UN_SUBSCRIBES }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
51
.github/workflows/jd_xtg.yml
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
||||
|
||||
name: jd_xtg
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 16 * * *' #北京时间0点运行,action会有延迟
|
||||
watch:
|
||||
types: started
|
||||
repository_dispatch:
|
||||
types: xtg
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.owner.id == github.event.sender.id
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: lxk0301/scripts
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v2 # 使用 GitHub 官方的缓存 Action。
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('package-lock.json') }} # 使用 package-lock.json 的 Hash 作为缓存的 key。也可以使用 package.json 代替
|
||||
- name: npm install
|
||||
run: |
|
||||
npm install
|
||||
- name: '运行 【星推官脚本】'
|
||||
run: |
|
||||
node jd_xtg.js
|
||||
env:
|
||||
JD_COOKIE: ${{ secrets.JD_COOKIE }}
|
||||
JD_DEBUG: ${{ secrets.JD_DEBUG }}
|
||||
PUSH_KEY: ${{ secrets.PUSH_KEY }}
|
||||
BARK_PUSH: ${{ secrets.BARK_PUSH }}
|
||||
BARK_SOUND: ${{ secrets.BARK_SOUND }}
|
||||
TG_BOT_TOKEN: ${{ secrets.TG_BOT_TOKEN }}
|
||||
TG_USER_ID: ${{ secrets.TG_USER_ID }}
|
||||
DD_BOT_TOKEN: ${{ secrets.DD_BOT_TOKEN }}
|
||||
DD_BOT_SECRET: ${{ secrets.DD_BOT_SECRET }}
|
||||
IGOT_PUSH_KEY: ${{ secrets.IGOT_PUSH_KEY }}
|
41
.github/workflows/repo_sync.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
# File: .github/workflows/repo-sync.yml
|
||||
name: sync-lxk0301-scripts
|
||||
on:
|
||||
schedule:
|
||||
- cron: '1 0,15 * * *'
|
||||
workflow_dispatch:
|
||||
watch:
|
||||
types: started
|
||||
push:
|
||||
branches: [ master ]
|
||||
repository_dispatch:
|
||||
types: sync-lxk0301-scripts
|
||||
jobs:
|
||||
repo-sync:
|
||||
env:
|
||||
PAT: ${{ secrets.PAT }} #此处PAT需要申请,教程详见:https://www.jianshu.com/p/bb82b3ad1d11
|
||||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: sync lxk0301-scripts
|
||||
uses: repo-sync/github-sync@v2
|
||||
if: env.PAT
|
||||
with:
|
||||
source_repo: "https://github.com/lxk0301/scripts.git"
|
||||
source_branch: "master"
|
||||
destination_branch: "master"
|
||||
github_token: ${{ secrets.PAT }}
|
||||
# 我自己同步到gitee使用,其他人可忽略
|
||||
- name: sync github -> gitee
|
||||
uses: Yikun/hub-mirror-action@master
|
||||
if: env.dst_key
|
||||
with:
|
||||
src: github/lxk0301
|
||||
dst: gitee/lxk0301
|
||||
static_list: "scripts"
|
||||
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
|
||||
dst_token: ${{ secrets.GITEE_TOKEN }}
|
6
.gitignore
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
/node_modules/
|
||||
/.idea
|
||||
/index.js
|
||||
/.history
|
||||
/box.dat
|
||||
/CookieSet.json
|
1
Env.min.js
vendored
Normal file
124
JD_extra_cookie.js
Normal file
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
感谢github@dompling的PR
|
||||
|
||||
Author: 2Ya
|
||||
|
||||
Github: https://github.com/domping
|
||||
|
||||
===================
|
||||
特别说明:
|
||||
1.获取多个京东cookie文件,不和野比大佬的文件冲突。暂不支持野比大佬脚本签到。
|
||||
2.若是要使用京东多合一签到,请使用修改版地址:https://raw.githubusercontent.com/dompling/Script/master/jd/JD_extra.js
|
||||
===================
|
||||
===================
|
||||
使用方式:复制 https://home.m.jd.com/myJd/newhome.action 到浏览器打开 ,在个人中心自动获取 cookie,
|
||||
若弹出成功则正常使用。否则继续再此页面继续刷新一下试试
|
||||
===================
|
||||
|
||||
===================
|
||||
[MITM]
|
||||
hostname = wq.jd.com
|
||||
|
||||
【Surge脚本配置】:
|
||||
===================
|
||||
[Script]
|
||||
获取京东Cookie = type=http-request,pattern=^https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion,requires-body=1,max-size=0,script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/JD_extra_cookie.js,script-update-interval=0
|
||||
|
||||
===================
|
||||
【Loon脚本配置】:
|
||||
===================
|
||||
[Script]
|
||||
http-request https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion tag=获取京东Cookie, script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/JD_extra_cookie.js
|
||||
|
||||
|
||||
===================
|
||||
【 QX 脚本配置 】 :
|
||||
===================
|
||||
|
||||
[rewrite_local]
|
||||
https:\/\/wq\.jd\.com\/user_new\/info\/GetJDUserInfoUnion url script-request-header https://raw.githubusercontent.com/lxk0301/scripts/master/JD_extra_cookie.js
|
||||
|
||||
*/
|
||||
|
||||
const APIKey = "CookiesJD";
|
||||
$ = new API(APIKey, true);
|
||||
const CacheKey = `#${APIKey}`;
|
||||
if ($request) GetCookie();
|
||||
|
||||
function getCache() {
|
||||
var cache = $.read(CacheKey) || "[]";
|
||||
$.log(cache);
|
||||
return JSON.parse(cache);
|
||||
}
|
||||
|
||||
function GetCookie() {
|
||||
try {
|
||||
if ($request.headers && $request.url.indexOf("GetJDUserInfoUnion") > -1) {
|
||||
var CV = $request.headers["Cookie"] || $request.headers["cookie"];
|
||||
if (CV.match(/(pt_key=.+?pt_pin=|pt_pin=.+?pt_key=)/)) {
|
||||
var CookieValue = CV.match(/pt_key=.+?;/) + CV.match(/pt_pin=.+?;/);
|
||||
var UserName = CookieValue.match(/pt_pin=(.+?);/)[1];
|
||||
var DecodeName = decodeURIComponent(UserName);
|
||||
var CookiesData = getCache();
|
||||
var updateCookiesData = [...CookiesData];
|
||||
var updateIndex;
|
||||
var CookieName = "【账号】";
|
||||
var updateCodkie = CookiesData.find((item, index) => {
|
||||
var ck = item.cookie;
|
||||
var Account = ck
|
||||
? ck.match(/pt_pin=.+?;/)
|
||||
? ck.match(/pt_pin=(.+?);/)[1]
|
||||
: null
|
||||
: null;
|
||||
const verify = UserName === Account;
|
||||
if (verify) {
|
||||
updateIndex = index;
|
||||
}
|
||||
return verify;
|
||||
});
|
||||
var tipPrefix = "";
|
||||
if (updateCodkie) {
|
||||
updateCookiesData[updateIndex].cookie = CookieValue;
|
||||
CookieName = `【账号${updateIndex + 1}】`;
|
||||
tipPrefix = "更新京东";
|
||||
} else {
|
||||
updateCookiesData.push({
|
||||
userName: DecodeName,
|
||||
cookie: CookieValue,
|
||||
});
|
||||
CookieName = "【账号" + updateCookiesData.length + "】";
|
||||
tipPrefix = "首次写入京东";
|
||||
}
|
||||
const cacheValue = JSON.stringify(updateCookiesData, null, "\t");
|
||||
$.write(cacheValue, CacheKey);
|
||||
$.notify(
|
||||
"用户名: " + DecodeName,
|
||||
"",
|
||||
tipPrefix + CookieName + "Cookie成功 🎉"
|
||||
);
|
||||
} else {
|
||||
$.notify("写入京东Cookie失败", "", "请查看脚本内说明, 登录网页获取 ‼️");
|
||||
}
|
||||
$.done();
|
||||
return;
|
||||
} else {
|
||||
$.notify("写入京东Cookie失败", "", "请检查匹配URL或配置内脚本类型 ‼️");
|
||||
}
|
||||
} catch (eor) {
|
||||
$.write("", CacheKey);
|
||||
$.notify("写入京东Cookie失败", "", "已尝试清空历史Cookie, 请重试 ⚠️");
|
||||
console.log(
|
||||
`\n写入京东Cookie出现错误 ‼️\n${JSON.stringify(
|
||||
eor
|
||||
)}\n\n${eor}\n\n${JSON.stringify($request.headers)}\n`
|
||||
);
|
||||
}
|
||||
$.done();
|
||||
}
|
||||
|
||||
// prettier-ignore
|
||||
function ENV(){const isQX=typeof $task!=="undefined";const isLoon=typeof $loon!=="undefined";const isSurge=typeof $httpClient!=="undefined"&&!isLoon;const isJSBox=typeof require=="function"&&typeof $jsbox!="undefined";const isNode=typeof require=="function"&&!isJSBox;const isRequest=typeof $request!=="undefined";const isScriptable=typeof importModule!=="undefined";return{isQX,isLoon,isSurge,isNode,isJSBox,isRequest,isScriptable}}
|
||||
// prettier-ignore
|
||||
function HTTP(baseURL,defaultOptions={}){const{isQX,isLoon,isSurge,isScriptable,isNode}=ENV();const methods=["GET","POST","PUT","DELETE","HEAD","OPTIONS","PATCH"];function send(method,options){options=typeof options==="string"?{url:options}:options;options.url=baseURL?baseURL+options.url:options.url;options={...defaultOptions,...options};const timeout=options.timeout;const events={...{onRequest:()=>{},onResponse:(resp)=>resp,onTimeout:()=>{},},...options.events,};events.onRequest(method,options);let worker;if(isQX){worker=$task.fetch({method,...options})}else if(isLoon||isSurge||isNode){worker=new Promise((resolve,reject)=>{const request=isNode?require("request"):$httpClient;request[method.toLowerCase()](options,(err,response,body)=>{if(err)reject(err);else resolve({statusCode:response.status||response.statusCode,headers:response.headers,body,})})})}else if(isScriptable){const request=new Request(options.url);request.method=method;request.headers=options.headers;request.body=options.body;worker=new Promise((resolve,reject)=>{request.loadString().then((body)=>{resolve({statusCode:request.response.statusCode,headers:request.response.headers,body,})}).catch((err)=>reject(err))})}let timeoutid;const timer=timeout?new Promise((_,reject)=>{timeoutid=setTimeout(()=>{events.onTimeout();return reject(`${method}URL:${options.url}exceeds the timeout ${timeout}ms`)},timeout)}):null;return(timer?Promise.race([timer,worker]).then((res)=>{clearTimeout(timeoutid);return res}):worker).then((resp)=>events.onResponse(resp))}const http={};methods.forEach((method)=>(http[method.toLowerCase()]=(options)=>send(method,options)));return http}
|
||||
// prettier-ignore
|
||||
function API(name="untitled",debug=false){const{isQX,isLoon,isSurge,isNode,isJSBox,isScriptable}=ENV();return new(class{constructor(name,debug){this.name=name;this.debug=debug;this.http=HTTP();this.env=ENV();this.node=(()=>{if(isNode){const fs=require("fs");return{fs}}else{return null}})();this.initCache();const delay=(t,v)=>new Promise(function(resolve){setTimeout(resolve.bind(null,v),t)});Promise.prototype.delay=function(t){return this.then(function(v){return delay(t,v)})}}initCache(){if(isQX)this.cache=JSON.parse($prefs.valueForKey(this.name)||"{}");if(isLoon||isSurge)this.cache=JSON.parse($persistentStore.read(this.name)||"{}");if(isNode){let fpath="root.json";if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err))}this.root={};fpath=`${this.name}.json`;if(!this.node.fs.existsSync(fpath)){this.node.fs.writeFileSync(fpath,JSON.stringify({}),{flag:"wx"},(err)=>console.log(err));this.cache={}}else{this.cache=JSON.parse(this.node.fs.readFileSync(`${this.name}.json`))}}}persistCache(){const data=JSON.stringify(this.cache);if(isQX)$prefs.setValueForKey(data,this.name);if(isLoon||isSurge)$persistentStore.write(data,this.name);if(isNode){this.node.fs.writeFileSync(`${this.name}.json`,data,{flag:"w"},(err)=>console.log(err));this.node.fs.writeFileSync("root.json",JSON.stringify(this.root),{flag:"w"},(err)=>console.log(err))}}write(data,key){this.log(`SET ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.write(data,key)}if(isQX){return $prefs.setValueForKey(data,key)}if(isNode){this.root[key]=data}}else{this.cache[key]=data}this.persistCache()}read(key){this.log(`READ ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){return $persistentStore.read(key)}if(isQX){return $prefs.valueForKey(key)}if(isNode){return this.root[key]}}else{return this.cache[key]}}delete(key){this.log(`DELETE ${key}`);if(key.indexOf("#")!==-1){key=key.substr(1);if(isSurge||isLoon){$persistentStore.write(null,key)}if(isQX){$prefs.removeValueForKey(key)}if(isNode){delete this.root[key]}}else{delete this.cache[key]}this.persistCache()}notify(title,subtitle="",content="",options={}){const openURL=options["open-url"];const mediaURL=options["media-url"];if(isQX)$notify(title,subtitle,content,options);if(isSurge){$notification.post(title,subtitle,content+`${mediaURL?"\n多媒体:"+mediaURL:""}`,{url:openURL})}if(isLoon){let opts={};if(openURL)opts["openUrl"]=openURL;if(mediaURL)opts["mediaUrl"]=mediaURL;if(JSON.stringify(opts)=="{}"){$notification.post(title,subtitle,content)}else{$notification.post(title,subtitle,content,opts)}}if(isNode||isScriptable){const content_=content+(openURL?`\n点击跳转:${openURL}`:"")+(mediaURL?`\n多媒体:${mediaURL}`:"");if(isJSBox){const push=require("push");push.schedule({title:title,body:(subtitle?subtitle+"\n":"")+content_,})}else{console.log(`${title}\n${subtitle}\n${content_}\n\n`)}}}log(msg){if(this.debug)console.log(msg)}info(msg){console.log(msg)}error(msg){console.log("ERROR: "+msg)}wait(millisec){return new Promise((resolve)=>setTimeout(resolve,millisec))}done(value={}){if(isQX||isLoon||isSurge){$done(value)}else if(isNode&&!isJSBox){if(typeof $context!=="undefined"){$context.headers=value.headers;$context.statusCode=value.statusCode;$context.body=value.body}}}})(name,debug)}
|
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
83
Loon/lxk0301_LoonTask.conf
Normal file
@@ -0,0 +1,83 @@
|
||||
# Loon软件Task配置 By lxk0301
|
||||
# GitHub主页(https://github.com/lxk0301/scripts)
|
||||
# TG讨论组 (https://t.me/JD_fruit_pet)
|
||||
# TG通知频道 (https://t.me/jdfruit)
|
||||
# Loon的Task脚本订阅链接: https://raw.githubusercontent.com/lxk0301/scripts/master/Loon/lxk0301_LoonTask.conf
|
||||
# 使用方法:打开APP,顶部的配置 -> 脚本 -> 订阅脚本- > 点击右上角+号 -> 添加url链接 (https://raw.githubusercontent.com/lxk0301/scripts/master/Loon/lxk0301_LoonTask.conf)
|
||||
|
||||
hostname = api.m.jd.com, draw.jdfcloud.com, jdjoy.jd.com, account.huami.com
|
||||
# 东东农场
|
||||
cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_fruit.js,tag=东东农场
|
||||
|
||||
# 东东萌宠
|
||||
cron "10 7-19/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_pet.js,tag=东东萌宠
|
||||
|
||||
# 京东种豆得豆
|
||||
cron "1 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_plantBean.js,tag=京东种豆得豆
|
||||
|
||||
# 宠汪汪(主要是日常任务,不过里面也有喂食和领取三餐狗粮)
|
||||
cron "15 */2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy.js,tag=宠汪汪
|
||||
|
||||
# 宠汪汪喂食
|
||||
cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_feedPets.js,tag=宠汪汪喂食
|
||||
|
||||
# 宠汪汪偷好友积分与狗粮
|
||||
cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_steal.js,tag=宠汪汪偷好友积分与狗粮
|
||||
|
||||
# 宠汪汪积分兑换奖品
|
||||
cron "1 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_reward.js,tag=宠汪汪积分兑换奖品
|
||||
|
||||
# 京东天天加速
|
||||
cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_speed.js,tag=京东天天加速
|
||||
|
||||
# 京东摇钱树
|
||||
cron "3 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_moneyTree.js,tag=京东摇钱树
|
||||
|
||||
# 京小超
|
||||
cron "11 1-23/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_superMarket.js,tag=京小超
|
||||
|
||||
# 京小超兑换奖品
|
||||
cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_blueCoin.js,tag=京小超兑换奖品
|
||||
|
||||
# 取关京东店铺商品
|
||||
cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_unsubscribe.js,tag=取关京东店铺商品
|
||||
|
||||
# 进店领豆
|
||||
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_shop.js,tag=进店领豆
|
||||
|
||||
#摇京豆
|
||||
cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_club_lottery.js,tag=摇京豆
|
||||
|
||||
# 京东手机狂欢城
|
||||
cron "1 0-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_818.js, tag=京东手机狂欢城
|
||||
|
||||
# 京东星推官
|
||||
cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_xtg.js, tag=京东星推官
|
||||
|
||||
#京东全民开红包
|
||||
cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_redPacket.js, tag=京东全民开红包
|
||||
|
||||
#京豆变动通知
|
||||
cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_bean_change.js, tag=京豆变动通知
|
||||
|
||||
#京东全民营业领金币
|
||||
cron "20 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_collectProduceScore.js, tag=京东全民营业领金币
|
||||
|
||||
#宠汪汪邀请助力与赛跑助力
|
||||
cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力
|
||||
|
||||
#宠汪汪助力更新Token
|
||||
http-response ^https:\/\/draw\.jdfcloud\.com\/\/api\/user\/addUser\?code=\w+& script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token
|
||||
|
||||
#宠汪汪助力获取Token
|
||||
http-request ^https:\/\/draw\.jdfcloud\.com\/\/api\/user\/user\/detail\?openId=\w+& script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token
|
||||
|
||||
# 宠汪汪强制为别人助力
|
||||
http-request ^https:\/\/draw\.jdfcloud\.com\/\/pet\/enterRoom\/h5\?reqSource=weapp&invitePin=.*+(&inviteSource=task_invite&shareSource=\w+&inviteTimeStamp=\d+&openId=\w+)?|^https:\/\/draw\.jdfcloud\.com\/\/pet\/helpFriend\?friendPin script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js, requires-body=true, timeout=10, tag=宠汪汪强制为别人助力
|
||||
|
||||
#聚宝盆投狗粮辅助(github@Zero-S1搬的)
|
||||
http-response ^https:\/\/jdjoy\.jd\.com\/pet\/getPetTreasureBox|^https:\/\/draw\.jdfcloud\.com\/\/pet\/getPetTreasureBox script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_petTreasureBox.js, requires-body=true, timeout=10, tag=聚宝盆投狗粮辅助
|
||||
|
||||
#小米运动
|
||||
cron "25 17 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/backUp/xmSports.js, tag=小米运动
|
||||
http-response ^https:\/\/account\.huami\.com\/v2\/client\/login script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/backUp/xmSports.js, requires-body=true, timeout=10, tag=小米运动获取Token
|
123
README.md
Normal file
@@ -0,0 +1,123 @@
|
||||
## 特别声明:
|
||||
|
||||
* 本仓库发布的Script项目中涉及的任何解锁和解密分析脚本,仅用于测试和学习研究,禁止用于商业用途,不能保证其合法性,准确性,完整性和有效性,请根据情况自行判断.
|
||||
|
||||
* 本项目内所有资源文件,禁止任何公众号、自媒体进行任何形式的转载、发布。
|
||||
|
||||
* lxk0301对任何脚本问题概不负责,包括但不限于由任何脚本错误导致的任何损失或损害.
|
||||
|
||||
* 间接使用脚本的任何用户,包括但不限于建立VPS或在某些行为违反国家/地区法律或相关法规的情况下进行传播, lxk0301 对于由此引起的任何隐私泄漏或其他后果概不负责.
|
||||
|
||||
* 请勿将Script项目的任何内容用于商业或非法目的,否则后果自负.
|
||||
|
||||
* 如果任何单位或个人认为该项目的脚本可能涉嫌侵犯其权利,则应及时通知并提供身份证明,所有权证明,我们将在收到认证文件后删除相关脚本.
|
||||
|
||||
* 任何以任何方式查看此项目的人或直接或间接使用该Script项目的任何脚本的使用者都应仔细阅读此声明。lxk0301 保留随时更改或补充此免责声明的权利。一旦使用并复制了任何相关脚本或Script项目的规则,则视为您已接受此免责声明.
|
||||
|
||||
**您必须在下载后的24小时内从计算机或手机中完全删除以上内容.** </br>
|
||||
> ***您使用或者复制了本仓库且本人制作的任何脚本,则视为`已接受`此声明,请仔细阅读***
|
||||
|
||||
## Script脚本列表
|
||||
|
||||
1. 京东水果([jd_fruit.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_fruit.js))
|
||||
2. 东东萌宠([jd_pet.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_pet.js))
|
||||
4. 种豆得豆([jd_plantBean.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_plantBean.js))
|
||||
5. 天天加速([jd_speed.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_speed.js))
|
||||
6. 摇钱树([jd_moneyTree.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_moneyTree.js))
|
||||
6. 宠汪汪([jd_joy.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy.js))
|
||||
7. 宠汪汪偷好友狗粮与积分([jd_joy_steal.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_steal.js))
|
||||
8. 宠汪汪单独喂食([jd_joy_feedPets.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_feedPets.js))
|
||||
9. 宠汪汪兑换奖品([jd_joy_reward.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_reward.js))
|
||||
10. 宠汪汪强制为好友助力(刷好友)([jd_joy_help.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_help.js))
|
||||
11. 宠汪汪赛跑助力([jd_joy_run.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_run.js))
|
||||
12. 宠汪汪聚宝盆辅助脚本([jd_petTreasureBox.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_petTreasureBox.js))
|
||||
13. 取关京东店铺和商品([jd_unsubscribe.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_unsubscribe.js))
|
||||
14. 京小超([jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_superMarket.js))
|
||||
15. 京小超兑换奖品([jd_blueCoin.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_blueCoin.js))
|
||||
16. 进店领豆([jd_shop.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_shop.js))
|
||||
17. 摇京豆([jd_club_lottery.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_club_lottery.js))
|
||||
18. 全名开红包([jd_redPacket.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_redPacket.js))
|
||||
19. 京东多合一签到([jd_bean_sign.js](https://raw.githubusercontent.com/lxk0301/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) 】
|
||||
20. 京豆变动通知([jd_bean_change.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_bean_change.js))
|
||||
21. 以及其他一部分在特定时间可用的薅京豆脚本,如 [手机狂欢城](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_818.js) 、[星推官](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_xtg.js) 等。
|
||||
|
||||
**脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js**
|
||||
|
||||
**TODO**
|
||||
|
||||
- [x] 完善京小超脚本[jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_superMarket.js)
|
||||
- [x] 京小超商圈助力功能[jd_superMarket.js](https://raw.githubusercontent.com/lxk0301/scripts/master/jd_superMarket.js)
|
||||
|
||||
## 食用方法
|
||||
|
||||
### 方法一:本地安装Node.js,下载本库脚本
|
||||
|
||||
- 教程请见:[EvineDeng/jd-base](https://github.com/EvineDeng/jd-base)
|
||||
|
||||
### 方法二:云服务器、腾讯云函数等等
|
||||
|
||||
- 需自行有云服务器,云函数等
|
||||
|
||||
- 腾云云函数使用 [教程说明](iCloud.md)
|
||||
|
||||
### 方法三:GitHub Action(推荐)
|
||||
|
||||
- 使用教程看 [GitHub Action教程](githubAction.md)
|
||||
- GitHub Action 定时运行会有延迟(大概15分钟左右),故一些需要抢购(对时间要求比较严格)脚本不适合使用(例如`jd_joy_reward.js`, `jd_blueCoin.js`, `jd_xtg.js`等脚本)
|
||||
- GitHub Action需要用到的[Secrets集合](https://github.com/lxk0301/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)
|
||||
|
||||
### 方法四:Docker(NAS或VPS用户)
|
||||
|
||||
- 可以精确控制任务运行时间,有三种办法:[docker办法一](https://github.com/lxk0301/scripts/tree/master/docker)、[docker办法二(和本地安装Node.js有点类似)](https://github.com/EvineDeng/jd-base)、[docker办法三](https://github.com/chinnkarahoi/jd-scripts-docker)
|
||||
- [环境变量](https://github.com/lxk0301/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)
|
||||
|
||||
#### 注:以上四种运行机制都是Node.js,故您需仔细阅读下面几点
|
||||
|
||||
|
||||
- 如果使用方法一与方法二,需自行提供京东cookie填写到 [jdCookie.js](https://github.com/lxk0301/scripts/blob/master/jdCookie.js) 里面
|
||||
|
||||
- 方法三京东cookie不要!不要!不要!填写到 [jdCookie.js](https://github.com/lxk0301/scripts/blob/master/jdCookie.js) 里面
|
||||
|
||||
- 获取京东cookie教程可参考 [浏览器获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie.md) , [插件获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie2.md)
|
||||
|
||||
- 方法四Docker安装Cookie请见各自的说明。
|
||||
|
||||
### 方法五:iOS系统的代理软件(QuantumultX, Surge, Loon, 小火箭)
|
||||
|
||||
#### 以下内容只针对iOS用户
|
||||
|
||||
#### ios使用多个京东账号,需要使用BoxJs保存多会话进行切换
|
||||
|
||||
##### BoxJs简单说明可看作者[BoxJs仓库地址](https://github.com/chavyleung/scripts/)
|
||||
|
||||
使用box可以实现远程订阅助力好友(需订阅此 [链接](https://raw.githubusercontent.com/lxk0301/scripts/master/lxk0301.boxjs.json))
|
||||
|
||||
- [BoxJs使用教程](https://chavyleung.gitbook.io/boxjs/)
|
||||
|
||||
- [BoxJs教程视频](https://youtu.be/eIpBrRxiy0w)
|
||||
|
||||
|
||||
【用box订阅的好处】
|
||||
|
||||
1、脚本也可以远程挂载。京东活动助力功能的分享码只需在box里面填写。以后只需远程更新就行。
|
||||
|
||||
2、所有脚本的cookie都可以备份,方便你迁移到其他支持box的软件。
|
||||
|
||||
3、box可以支持多账号
|
||||
|
||||
### 赞赏码(开发维护不易,请赏杯茶水费)
|
||||
<div align=center><img width="250" height="250" src="https://raw.githubusercontent.com/lxk0301/scripts/master/icon/thanks.jpg"/></div>
|
||||
|
||||
### 特别感谢(排名不分先后):
|
||||
* [@NobyDa](https://github.com/NobyDa)
|
||||
|
||||
* [@chavyleung](https://github.com/chavyleung)
|
||||
|
||||
* [@liuxiaoyucc](https://github.com/liuxiaoyucc)
|
||||
|
||||
* [@Zero-S1](https://github.com/Zero-S1)
|
||||
|
||||
* [@uniqueque](https://github.com/uniqueque)
|
||||
|
||||
|
||||
* [@nzw9314](https://github.com/nzw9314)
|
33
Surge/lxk0301_Task.sgmodule.sgmodule
Normal file
@@ -0,0 +1,33 @@
|
||||
#!name=lxk0301 iOS Tasks Module
|
||||
#!desc=iOS Tasks 模块配置
|
||||
#!system=ios
|
||||
|
||||
# Task模块配置 By lxk0301
|
||||
# GitHub主页(https://github.com/lxk0301/scripts)
|
||||
# TG讨论组 (https://t.me/JD_fruit_pet)
|
||||
# TG通知频道 (https://t.me/jdfruit)
|
||||
# Surge的Task脚本模块地址: https://raw.githubusercontent.com/lxk0301/scripts/master/Surge/lxk0301_Task.sgmodule.sgmodule
|
||||
|
||||
[Script]
|
||||
|
||||
cron "5 6-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_fruit.js,timeout=530, wake-system=1, tag=东东农场
|
||||
cron "20 7-19/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_pet.js,timeout=530, wake-system=1, tag=东东萌宠
|
||||
cron "10 7-21/2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_plantBean.js,timeout=630, wake-system=1, tag=京东种豆得豆
|
||||
cron "15 */2 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy.js,timeout=330, wake-system=1, tag=宠汪汪
|
||||
cron "12 */1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_feedPets.js,timeout=30, wake-system=1, tag=宠汪汪喂食
|
||||
cron "0 0,6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_steal.js,timeout=420, wake-system=1, tag=宠汪汪偷好友积分与狗粮
|
||||
cron "1 0,8,12,16 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_reward.js,timeout=30, wake-system=1, tag=宠汪汪积分兑换奖品
|
||||
cron "8 */3 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_speed.js,timeout=130, wake-system=1, tag=京东天天加速
|
||||
cron "15 */5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_moneyTree.js,timeout=130, wake-system=1, tag=京东摇钱树
|
||||
cron "5 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_club_lottery.js, timeout=50, wake-system=1, tag=摇京豆
|
||||
cron "11 1-23/5 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_superMarket.js,timeout=530, wake-system=1, tag=京小超
|
||||
cron "0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_blueCoin.js,timeout=30, wake-system=1, tag=京小超领蓝币(兑换京豆)
|
||||
cron "55 23 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_unsubscribe.js,timeout=250, wake-system=1, tag=取关京东店铺商品
|
||||
cron "10 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_shop.js,timeout=30, wake-system=1, tag=进店领豆
|
||||
cron "1 0-18/6 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_818.js, timeout=150, wake-system=1, tag=京东手机狂欢城
|
||||
cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_joy_run.js, timeout=30, wake-system=1, tag=宠汪汪邀请助力与赛跑助力
|
||||
cron "1 1 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_redPacket.js, wake-system=1, tag=京东全民开红包
|
||||
cron "0 0 0 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_xtg.js, timeout=550, wake-system=1, tag=京东星推官
|
||||
cron "2 9 * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_bean_change.js, timeout=650, wake-system=1, tag=京豆变动通知
|
||||
cron "20 * * * *" script-path=https://raw.githubusercontent.com/lxk0301/scripts/master/jd_collectProduceScore.js, wake-system=1, tag=京东全民营业领金币
|
||||
|
14
backUp/AlipayManor.js
Normal file
32
backUp/GetJdCookie.md
Normal file
@@ -0,0 +1,32 @@
|
||||
## 浏览器获取京东cookie教程
|
||||
|
||||
**以下浏览器都行**
|
||||
|
||||
- Chrome浏览器
|
||||
- 新版Edge浏览器
|
||||
- 国产360,QQ浏览器切换到极速模式
|
||||
|
||||
### 操作步骤
|
||||
|
||||
1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/)
|
||||
2. 按键盘F12键打开开发者工具,然后点下图中的图标
|
||||

|
||||
3. 此时是未登录状态(使用手机短信验证码登录),如已登录请忽略此步骤
|
||||
- 使用手机短信验证码登录(此方式cookie有效时长大概31天,其他登录方式比较短)
|
||||
4. 登录后,选择Network,有很多链接的话点箭头这里清空下
|
||||

|
||||
5. 然后再点我的,链接就变少了
|
||||

|
||||
6. 点第一个链接(log.gif)进去,找到cookie,复制出来,新建一个TXT文本临时保存一下,下面需要用到
|
||||

|
||||
7. 第六步复制出来的cookie比较长,我们只需要`pt_pin=xxxx;`和 `pt_key=xxxx;`部分的内容即可(注:英文引号`;`是必要的)。可以用下面的脚本,在Chrome浏览器按F12,console里面输入下面脚本按enter回车键
|
||||
```
|
||||
var CV = '单引号里面放第六步拿到的cookie';
|
||||
var CookieValue = CV.match(/pt_pin=.+?;/) + CV.match(/pt_key=.+?;/);
|
||||
copy(CookieValue);
|
||||
```
|
||||
8. 这样子整理出关键的的cookie已经在你的剪贴板上, 可直接粘贴
|
||||
|
||||
9. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可
|
||||
|
||||
|
34
backUp/GetJdCookie2.md
Normal file
@@ -0,0 +1,34 @@
|
||||
## 浏览器插件获取京东cookie教程
|
||||
> 此教程内容由tg用户@wukongdada提供,特此感谢
|
||||
|
||||
**以下浏览器都行**
|
||||
|
||||
- Chrome浏览器
|
||||
- 新版Edge浏览器(chrome内核)
|
||||
|
||||
### 操作步骤
|
||||
|
||||
1. 电脑浏览器打开京东网址 [https://m.jd.com/](https://m.jd.com/)
|
||||
2. Chrome类浏览器安装EditThisCookie插件
|
||||
- Chrome插件商店搜EditThisCookie, 或者[打开此网站](https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?utm_source=chrome-ntp-icon) 进行安装
|
||||
- 仅使用百分浏览器,谷歌浏览器测试过,其他谷歌类浏览器请自行测试。
|
||||
- 无法登录Chrome插件商店或者打不开网址建议使用edge chrome版。
|
||||
3. edge chrome浏览器安装Cookie Editor插件
|
||||
- [edge插件商店](edge://extensions/)搜Cookie Editor,或[打开以下网址](https://microsoftedge.microsoft.com/addons/detail/cookie-editor/ajfboaconbpkglpfanbmlfgojgndmhmc?hl=zh-CN) 完成插件安装
|
||||
4. 以下是chrome和edge的相关设置截图,输入的网址是 ``jd.com``
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
5. 现在点击回到京东触屏版,再点击EditThisCookie/Cookie Editor,再点击搜索,输入key或pin,如下图所示的pt_key,复制pt_key的value值。此插件可以看到cookie的有效期。
|
||||
|
||||

|
||||
|
||||
6. 按照以下格式形成自己的jd_cookie
|
||||
- `pt_key=复制插件搜索出来的key值;pt_pin=复制插件搜索出来的pin值;` ,后面的英文引号`;`是必须要的
|
||||
- 给一个京东cookie具体示例 `pt_key=jdDC2F833333EFDGTCE5BD4AD1A952D4F4DF84A46052;pt_pin=jd_123456;`
|
||||
|
||||
7. 如果需获取第二个京东账号的cookie,不要在刚才的浏览器上面退出登录账号一(否则刚才获取的cookie会失效),需另外换一个浏览器(Chrome浏览器 `ctr+shift+n` 打开无痕模式也行),然后继续按上面步骤操作即可
|
||||
|
||||
|
1
backUp/box.dat
Normal file
@@ -0,0 +1 @@
|
||||
{"xmSportsToken":"NQVBQFJyQktGHlp6QkpbRl5LRl5qek4uXAQEBAAAAAGO7kpHjD12b7XMcMKDSBdSnFqUjo0nKgND2uVe2RU10bVRzihKr9fi1iytA--qwNLIo345eRNP9QGAi7n3r0_yx1pRNSNJo90wQTheHJ0E94wjCWzCVsyqOpdMnnJig6M_nMddl5XR-KdonsCjn-zR_W8ErxueIr4O7QH4ZXUK6Kyrj5FHU_zqW5Zqd9__ALGFOaY1c6tC4A28YNdhF9pA"}
|
197
backUp/cashSign.js
Normal file
100
backUp/gitSync.md
Normal file
@@ -0,0 +1,100 @@
|
||||
## 保持自己github的forks自动和上游仓库同步的教程
|
||||
- 信息来源于 [https://github.com/wei/pull](https://github.com/wei/pull)
|
||||
- 以下教程仅是出于个人爱好,不保证本教程的完全正确性,最终请以作者 [https://github.com/wei/pull](https://github.com/wei/pull) 的描述为准。
|
||||
- 注:此教程由telegram用户@wukongdada提供
|
||||
### 1、只同步默认分支的教程
|
||||
|
||||
> 当上游的仓库仅有一个默认分支。或者上游仓库有两个分支,我们仅需要同步他的默认分支,其他分支对内容对我们来说无关紧要。
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
a) 登录自己的github账号,另开网页打开 [https://github.com/wei/pull](https://github.com/wei/pull)
|
||||
|
||||
|
||||
|
||||
b) 点击Pull app进行安装。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
c) 安装过程中会让你选择要选择那一种方式,All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),根据自己需求选择,实在不知道怎么选择,就选All repositories;点击install,完成安装。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
d) 后续,如果要调整1.c中的选项,打开 [https://github.com/apps/pull](https://github.com/apps/pull) ,点击Configure,输入github密码进入pull的相关设置。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
e) 进入后,找到Repository access,根据自己的需求,重新选择:All repositories(就是同步已经frok的仓库以及未来fork的仓库),Only select repositories(仅选择要自己需要同步的仓库,其他fork的仓库不会被同步),Save后保存生效。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
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。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 2、同步其他分支的教程
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
a) 假设你fork了上游仓库后,你fork后的地址为 `https://github.com/你的仓库名字/test` ,首先设置完成第1部分内容,注意在1.c步骤没有设置全部同步的,要回到1.e步,确认是否设置同步了 `你的仓库名字/test`,如果没有,请添加上。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
b) 在默认分支下添加一个文件。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
c) 复制 ``.github/pull.yml`` 粘贴后看到以下页面,注意github前面的那个.别漏掉了。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
d) 请在https://github.com/wei/pull\#advanced-setup-with-config 页复制代码,
|
||||
|
||||
注意:upstream处要修改为上游仓库作者名字。
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
e) 最终的示例如下,假设上游作者是zhangsan,所有的注意点都用红线圈出来了,保存后生效。
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
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提供的图片。
|
||||
|
||||
|
||||
|
||||
g) 本人仅测试过forks一个仓库只有2个分支的项目,如果有多个分支,不能保证是否可行,请自行测试,或者是使用本教程第3部分高级玩法。
|
||||
|
||||
### 高级玩法
|
||||
|
||||
>当然,作者还有其他更好的项目用于同步所有分支,例如使用 GitHub actions 进行同步。请参考原作者的项目
|
||||
|
||||
- [https://github.com/wei/git-sync](https://github.com/wei/git-sync)
|
||||
- [https://github.com/repo-sync/github-sync](https://github.com/repo-sync/github-sync)
|
33
backUp/iepngs.boxjs.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"id": "iepngs.app.sub",
|
||||
"name": "iepngs脚本订阅(自用,非作者本人的订阅)",
|
||||
"author": "@iepngs",
|
||||
"icon": "https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4",
|
||||
"repo": "https://github.com/iepngs/Script",
|
||||
"apps": [
|
||||
{
|
||||
"id": "lxhealth",
|
||||
"name": "乐心健康",
|
||||
"keys": [
|
||||
"lxhealthCookie",
|
||||
"lxhealthStep"
|
||||
],
|
||||
"settings": [
|
||||
{
|
||||
"id": "lxhealthStep",
|
||||
"name": "运动步数",
|
||||
"val": "",
|
||||
"type": "text",
|
||||
"desc": "修改乐心健康运动步数"
|
||||
}
|
||||
],
|
||||
"author": "@iepngs",
|
||||
"repo": "https://github.com/iepngs/Script",
|
||||
"script": "https://raw.githubusercontent.com/iepngs/Script/master/lxhealth/index.js",
|
||||
"icons": [
|
||||
"https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4",
|
||||
"https://avatars2.githubusercontent.com/u/10695382?s=460&u=efc97d623c7c21170e6794f367fa80a97253f87b&v=4"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
1000
backUp/jd_fruit_double.js
Normal file
510
backUp/jd_joy2.js
Normal file
45
backUp/jd_joy_help2.js
Normal file
452
backUp/jd_moneyTree2.js
Normal file
530
backUp/jd_pet_double.js
Normal file
595
backUp/jd_plantBean_double.js
Normal file
321
backUp/jd_speed2.js
Normal file
82
backUp/webhook.js
Normal file
175
backUp/xmSports.js
Normal file
34
backUp/xmly_speed_ccokie.js
Normal file
23
docker/Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
||||
FROM alpine
|
||||
MAINTAINER Akira <e.akimoto.akira@gmail.com>
|
||||
|
||||
RUN set -ex \
|
||||
&& apk update && apk upgrade\
|
||||
&& apk add --no-cache tzdata git nodejs npm\
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" > /etc/timezone
|
||||
|
||||
RUN git clone https://github.com/lxk0301/scripts /scripts \
|
||||
&& cd /scripts \
|
||||
&& mkdir logs \
|
||||
&& npm install \
|
||||
&& cd ~ \
|
||||
&& npm install request
|
||||
|
||||
ENV CDN_JD_DAILYBONUS true
|
||||
|
||||
RUN crontab /scripts/docker/crontab_list.sh
|
||||
|
||||
WORKDIR /scripts
|
||||
|
||||
CMD ["node"]
|
103
docker/Readme.md
Normal file
@@ -0,0 +1,103 @@
|
||||
### Usage
|
||||
> 推荐使用`docker-compose`所以这里只介绍`docker-compose`使用方式
|
||||
|
||||
- `docker-compose` 安装(群晖nas docker自带安装了docker-compose)
|
||||
```
|
||||
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
|
||||
sudo chmod +x /usr/local/bin/docker-compose
|
||||
```
|
||||
### 如果需要使用 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)
|
||||
> 注⚠️:前提先理解学会使用这下面的教程
|
||||
### 创建一个目录`jd_scripts`用于存放备份配置等数据,迁移重装的时候只需要备份整个jd_scripts目录即可
|
||||
需要新建的目录文件结构参考如下:
|
||||
```
|
||||
jd_scripts
|
||||
├── logs
|
||||
│ ├── XXXX.log
|
||||
│ └── XXXX.log
|
||||
├── my_crontab_list.sh
|
||||
└── docker-compose.yml
|
||||
```
|
||||
- `jd_scripts/logs`建一个空文件夹就行
|
||||
- `jd_scripts/docker-compose.yml` 参考内容如下:
|
||||
- `jd_scripts/docker-compose.yml`里面的环境变量(`environment:`)配置[参考这里](https://github.com/lxk0301/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)
|
||||
```yaml
|
||||
jd_scripts:
|
||||
image: akyakya/jd_scripts
|
||||
container_name: jd_scripts
|
||||
restart: always
|
||||
#如果需要自定定义定时任务的需要自己写好`my_crontab_list.sh`文件 ,取消下面的注释 ,通过 `volumes`挂载进去。
|
||||
volumes:
|
||||
- ./logs:/scripts/logs
|
||||
# - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh
|
||||
tty: true
|
||||
environment:
|
||||
# 注意环境变量填写值的时候一律不需要引号(")下面这些只是事例,根据自己的需求增加删除
|
||||
#jd cookies
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
#微信server酱通
|
||||
- PUSH_KEY=""
|
||||
#Bark App通知
|
||||
- BARK_PUSH=""
|
||||
#telegram机器人通知
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
#钉钉机器人通知
|
||||
- DD_BOT_TOKEN=""
|
||||
- DD_BOT_SECRET=""
|
||||
#京东种豆得豆
|
||||
- PLANT_BEAN_SHARECODES=""
|
||||
#京东农场
|
||||
- FRUITSHARECODES=""
|
||||
#京东萌宠
|
||||
- PETSHARECODES=""
|
||||
- JOY_FEED_COUNT=""
|
||||
#京小超
|
||||
- SUPERMARKET_SHARECODES=""
|
||||
#兑换多少数量的京豆(1-20之间,或者1000),0默认兑换不兑换,如需兑换把0改成1-20之间的数字或者1000即可
|
||||
- MARKET_COIN_TO_BEANS=""
|
||||
#是否开启debug模式打印日志
|
||||
- JD_DEBUG=""
|
||||
#该字段必须配置是否使用了自定义定时任务列表,使用了需要把这个名字改成my_crontab_list.sh
|
||||
- CRONTAB_LIST_FILE=crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
#crontab /scripts/docker/my_crontab_list.sh #如果挂载了自定义任务文件 需要在 crond 的上面加行
|
||||
crond
|
||||
node
|
||||
```
|
||||
- `jd_scripts/my_crontab_list.sh` 参考内容如下:
|
||||
```shell
|
||||
0 */1 * * * git -C /scripts/ pull >> /scripts/logs/pull.log 2>&1
|
||||
2 0 * * * node /scripts/jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
|
||||
2 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1
|
||||
2 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1
|
||||
20 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1
|
||||
*/20 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1
|
||||
0 0,4,8,16 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1
|
||||
0 1,6 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1
|
||||
0 0,1,4,10,15,16 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1
|
||||
40 */3 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1
|
||||
35 23,4,10 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1
|
||||
0 23,0-13/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1
|
||||
2 0 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1
|
||||
3 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1
|
||||
15 * * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1
|
||||
55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1
|
||||
```
|
||||
- 目录文件配置好之后在 `jd_scripts`目录执行
|
||||
`docker-compose up -d` 启动;
|
||||
`docker-compose logs` 打印日志;
|
||||
`docker-compose pull` 更新镜像;
|
||||
`docker-compose stop` 停止容器;
|
||||
`docker-compose restart` 重启容器;
|
||||
`docker-compose down` 停止并删除容器;
|
||||
|
||||
- 如果是群晖用户,在docker注册表搜jd_scripts,双击下载映像。
|
||||
不需要docker-compose.yml,只需建个logs/目录,调整`jd_scripts.syno.json`里面对应的配置值,然后导入json配置新建容器。
|
||||
若要自定义my_crontab_list.sh,再建个my_crontab_list.sh文件,配置参考`jd_scripts.my_crontab_list.syno.json`。
|
||||

|
||||

|
||||

|
26
docker/crontab_list.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
0 */1 * * * git -C /scripts/ pull >> /scripts/logs/pull.log 2>&1
|
||||
# 每3天的23:50分清理一次日志
|
||||
50 23 */3 * * rm -rf /scripts/logs/*.log
|
||||
2 */1 * * * crontab /scripts/docker/${CRONTAB_LIST_FILE}
|
||||
0 0-18/6,9 * * * node /scripts/jd_818.js >> /scripts/logs/jd_818.log 2>&1
|
||||
0,10 0 * * * node /scripts/jd_xtg.js >> /scripts/logs/jd_xtg.log 2>&1
|
||||
0 0,12,18 * * * node /scripts/jd_bean_sign.js >> /scripts/logs/jd_bean_sign.log 2>&1
|
||||
0 0 * * * node /scripts/jd_blueCoin.js >> /scripts/logs/jd_blueCoin.log 2>&1
|
||||
0 0 * * * node /scripts/jd_club_lottery.js >> /scripts/logs/jd_club_lottery.log 2>&1
|
||||
5 6-18/6 * * * node /scripts/jd_fruit.js >> /scripts/logs/jd_fruit.log 2>&1
|
||||
15 */2 * * * node /scripts/jd_joy.js >> /scripts/logs/jd_joy.log 2>&1
|
||||
15 */1 * * * node /scripts/jd_joy_feedPets.js >> /scripts/logs/jd_joy_feedPets.log 2>&1
|
||||
0 0-16/8 * * * node /scripts/jd_joy_reward.js >> /scripts/logs/jd_joy_reward.log 2>&1
|
||||
0 0,6 * * * node /scripts/jd_joy_steal.js >> /scripts/logs/jd_joy_steal.log 2>&1
|
||||
0 */2 * * * node /scripts/jd_moneyTree.js >> /scripts/logs/jd_moneyTree.log 2>&1
|
||||
5 6-18/6 * * * node /scripts/jd_pet.js >> /scripts/logs/jd_pet.log 2>&1
|
||||
0 7-22/1 * * * node /scripts/jd_plantBean.js >> /scripts/logs/jd_plantBean.log 2>&1
|
||||
1 1 * * * node /scripts/jd_redPacket.js >> /scripts/logs/jd_redPacket.log 2>&1
|
||||
10 0 * * * node /scripts/jd_shop.js >> /scripts/logs/jd_shop.log 2>&1
|
||||
8 */3 * * * node /scripts/jd_speed.js >> /scripts/logs/jd_speed.log 2>&1
|
||||
11 1-23/5 * * * node /scripts/jd_superMarket.js >> /scripts/logs/jd_superMarket.log 2>&1
|
||||
55 23 * * * node /scripts/jd_unsubscribe.js >> /scripts/logs/jd_unsubscribe.log 2>&1
|
||||
0 */1 * * * node /scripts/jd_collectProduceScore.js >> /scripts/logs/jd_collectProduceScore.log 2>&1
|
||||
0 2 * * * node /scripts/jd_bean_change.js >> /scripts/logs/jd_bean_change.log 2>&1
|
||||
11 1 * * * node /scripts/jd_lotteryMachine.js >> /scripts/logs/jd_lotteryMachine.log 2>&1
|
||||
11 9 * * * node /scripts/jd_rankingList.js >> /scripts/logs/jd_rankingList.log 2>&1
|
BIN
docker/dir.png
Normal file
After Width: | Height: | Size: 48 KiB |
52
docker/docker-compose.yml
Normal file
@@ -0,0 +1,52 @@
|
||||
jd_scripts:
|
||||
image: akyakya/jd_scripts
|
||||
container_name: jd_scripts
|
||||
restart: always
|
||||
#如果需要自定定义定时任务的需要自己写好`my_crontab_list.sh`文件 ,取消下面的挂载注释 ,通过 `volumes`挂载进去。
|
||||
volumes:
|
||||
# - ./my_crontab_list.sh:/scripts/docker/my_crontab_list.sh
|
||||
- ./logs:/scripts/logs
|
||||
tty: true
|
||||
environment:
|
||||
# 注意环境变量填写值的时候一律不需要引号(""或者'')下面这些只是事例,根据自己的需求增加删除
|
||||
#jd cookies
|
||||
# 例: JD_COOKIE=pt_key=XXX;pt_pin=XXX
|
||||
- JD_COOKIE=
|
||||
#微信server酱通
|
||||
- PUSH_KEY=
|
||||
#Bark App通知
|
||||
- BARK_PUSH=
|
||||
#telegram机器人通知
|
||||
- TG_BOT_TOKEN=
|
||||
- TG_USER_ID=
|
||||
#钉钉机器人通知
|
||||
- DD_BOT_TOKEN=
|
||||
- DD_BOT_SECRET=
|
||||
#京东种豆得豆
|
||||
- PLANT_BEAN_SHARECODES=
|
||||
#京东农场
|
||||
# 例: FRUITSHARECODES=京东农场的互助码
|
||||
- FRUITSHARECODES=
|
||||
#京东萌宠
|
||||
# 例: PETSHARECODES=东东萌宠的互助码
|
||||
- PETSHARECODES=
|
||||
# 宠汪汪的喂食数量
|
||||
- JOY_FEED_COUNT=
|
||||
#京小超
|
||||
# - SUPERMARKET_SHARECODES=
|
||||
#兑换多少数量的京豆(20,或者1000京豆,或者其他奖品的文字)
|
||||
# 例: MARKET_COIN_TO_BEANS=1000
|
||||
- MARKET_COIN_TO_BEANS=
|
||||
#是否开启debug模式打印日志
|
||||
# 例: JD_DEBUG=false
|
||||
- JD_DEBUG=
|
||||
#是否使用了自定义定时任务,这个名字改成my_crontab_list.sh
|
||||
- CRONTAB_LIST_FILE=crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
#crontab /scripts/docker/my_crontab_list.sh #如果挂载了自定义任务文件,取消此条注释即可
|
||||
crond
|
||||
git -C /scripts/ pull
|
||||
node
|
123
docker/docker多账户使用独立容器使用说明.md
Normal file
@@ -0,0 +1,123 @@
|
||||
### 使用此方式,请先理解学会使用[docker办法一](https://github.com/lxk0301/scripts/tree/master/docker#%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95jd_scripts%E7%94%A8%E4%BA%8E%E5%AD%98%E6%94%BE%E5%A4%87%E4%BB%BD%E9%85%8D%E7%BD%AE%E7%AD%89%E6%95%B0%E6%8D%AE%E8%BF%81%E7%A7%BB%E9%87%8D%E8%A3%85%E7%9A%84%E6%97%B6%E5%80%99%E5%8F%AA%E9%9C%80%E8%A6%81%E5%A4%87%E4%BB%BD%E6%95%B4%E4%B8%AAjd_scripts%E7%9B%AE%E5%BD%95%E5%8D%B3%E5%8F%AF)的使用方式
|
||||
> 发现有人好像希望不同账户任务并发执行,不想一个账户执行完了才能再执行另一个,这里写一个`docker办法一`的基础上实现方式,其实就是不同账户创建不同的容器,他们互不干扰单独定时执行自己的任务。
|
||||
配置使用起来还是比较简单的,具体往下看
|
||||
### 文件夹目录参考
|
||||

|
||||
### 具体使用说明直接在图片标注了,文件参考[图片下方](https://github.com/lxk0301/scripts/new/master/docker#docker-composeyml%E6%96%87%E4%BB%B6%E5%8F%82%E8%80%83),配置完成后的[执行命令]()
|
||||

|
||||
#### `docker-compose.yml`文件参考
|
||||
```yaml
|
||||
version: '3'
|
||||
services:
|
||||
jd_scripts1:
|
||||
image: akyakya/jd_scripts
|
||||
restart: always
|
||||
container_name: jd_scripts1
|
||||
tty: true
|
||||
volumes:
|
||||
- ./logs1:/scripts/logs
|
||||
environment:
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
- CRONTAB_LIST_FILE=crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git -C /scripts/ pull
|
||||
crond
|
||||
node
|
||||
jd_scripts2:
|
||||
image: akyakya/jd_scripts
|
||||
restart: always
|
||||
container_name: jd_scripts2
|
||||
tty: true
|
||||
volumes:
|
||||
- ./logs2:/scripts/logs
|
||||
environment:
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
- CRONTAB_LIST_FILE=crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
git -C /scripts/ pull
|
||||
crond
|
||||
node
|
||||
jd_scripts3:
|
||||
image: akyakya/jd_scripts
|
||||
restart: always
|
||||
container_name: jd_scripts3
|
||||
tty: true
|
||||
volumes:
|
||||
- ./logs3:/scripts/logs
|
||||
- ./my_crontab_list3.sh:/scripts/docker/my_crontab_list.sh
|
||||
environment:
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
- CRONTAB_LIST_FILE=my_crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
crontab /scripts/docker/my_crontab_list.sh
|
||||
git -C /scripts/ pull
|
||||
crond
|
||||
node
|
||||
jd_scripts4:
|
||||
image: akyakya/jd_scripts
|
||||
restart: always
|
||||
container_name: jd_scripts4
|
||||
tty: true
|
||||
volumes:
|
||||
- ./logs4:/scripts/logs
|
||||
- ./my_crontab_list4.sh:/scripts/docker/my_crontab_list.sh
|
||||
environment:
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
- CRONTAB_LIST_FILE=my_crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
crontab /scripts/docker/my_crontab_list.sh
|
||||
git -C /scripts/ pull
|
||||
crond
|
||||
node
|
||||
jd_scripts5:
|
||||
image: akyakya/jd_scripts
|
||||
restart: always
|
||||
container_name: jd_scripts5
|
||||
tty: true
|
||||
volumes:
|
||||
- ./logs5:/scripts/logs
|
||||
- ./my_crontab_list5.sh:/scripts/docker/my_crontab_list.sh
|
||||
environment:
|
||||
- JD_COOKIE=pt_key=AAJfjaNrADAS8ygfgIsOxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxxx5;
|
||||
- TG_BOT_TOKEN=130xxxx280:AAExxxxxxWP10zNf91WQ
|
||||
- TG_USER_ID=12xxxx206
|
||||
- CRONTAB_LIST_FILE=my_crontab_list.sh
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
crontab /scripts/docker/my_crontab_list.sh
|
||||
git -C /scripts/ pull
|
||||
crond
|
||||
node
|
||||
```
|
||||
#### 目录文件配置好之后在 `jd_scripts_multi`目录执行
|
||||
`docker-compose up -d` 启动;
|
||||
`docker-compose logs` 打印日志;
|
||||
`docker-compose pull` 更新镜像;
|
||||
`docker-compose stop` 停止容器;
|
||||
`docker-compose restart` 重启容器;
|
||||
`docker-compose down` 停止并删除容器;
|
||||

|
||||
|
||||
|
BIN
docker/import.png
Normal file
After Width: | Height: | Size: 117 KiB |
BIN
docker/info.png
Normal file
After Width: | Height: | Size: 201 KiB |
65
docker/jd_scripts.my_crontab_list.syno.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"cap_add" : [],
|
||||
"cap_drop" : [],
|
||||
"cmd" : "/bin/sh -c 'crontab /scripts/docker/my_crontab_list.sh && crond && node'",
|
||||
"cpu_priority" : 50,
|
||||
"devices" : null,
|
||||
"enable_publish_all_ports" : false,
|
||||
"enable_restart_policy" : true,
|
||||
"enabled" : true,
|
||||
"env_variables" : [
|
||||
{
|
||||
"key" : "PATH",
|
||||
"value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
},
|
||||
{
|
||||
"key" : "CDN_JD_DAILYBONUS",
|
||||
"value" : "true"
|
||||
},
|
||||
{
|
||||
"key" : "JD_COOKIE",
|
||||
"value" : "pt_key=xxx;pt_pin=xxx;"
|
||||
},
|
||||
{
|
||||
"key" : "PUSH_KEY",
|
||||
"value" : ""
|
||||
},
|
||||
{
|
||||
"key" : "CRONTAB_LIST_FILE",
|
||||
"value" : "my_crontab_list.sh"
|
||||
}
|
||||
],
|
||||
"exporting" : false,
|
||||
"id" : "3a2f6f27c23f93bc104585c22569c760cc9ce82df09cdb41d53b491fe1d0341c",
|
||||
"image" : "akyakya/jd_scripts",
|
||||
"is_ddsm" : false,
|
||||
"is_package" : false,
|
||||
"links" : [],
|
||||
"memory_limit" : 0,
|
||||
"name" : "jd_scripts",
|
||||
"network" : [
|
||||
{
|
||||
"driver" : "bridge",
|
||||
"name" : "bridge"
|
||||
}
|
||||
],
|
||||
"network_mode" : "default",
|
||||
"port_bindings" : [],
|
||||
"privileged" : false,
|
||||
"shortcut" : {
|
||||
"enable_shortcut" : false
|
||||
},
|
||||
"use_host_network" : false,
|
||||
"volume_bindings" : [
|
||||
{
|
||||
"host_volume_file" : "/docker/jd_scripts/my_crontab_list.sh",
|
||||
"mount_point" : "/scripts/docker/my_crontab_list.sh",
|
||||
"type" : "rw"
|
||||
},
|
||||
{
|
||||
"host_volume_file" : "/docker/jd_scripts/logs",
|
||||
"mount_point" : "/scripts/logs",
|
||||
"type" : "rw"
|
||||
}
|
||||
]
|
||||
}
|
83
docker/jd_scripts.syno.json
Normal file
@@ -0,0 +1,83 @@
|
||||
{
|
||||
"cap_add" : null,
|
||||
"cap_drop" : null,
|
||||
"cmd" : "/bin/sh -c 'crond && node'",
|
||||
"cpu_priority" : 0,
|
||||
"devices" : null,
|
||||
"enable_publish_all_ports" : false,
|
||||
"enable_restart_policy" : true,
|
||||
"enabled" : false,
|
||||
"env_variables" : [
|
||||
{
|
||||
"key" : "PATH",
|
||||
"value" : "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
},
|
||||
{
|
||||
"key" : "CDN_JD_DAILYBONUS",
|
||||
"value" : "true"
|
||||
},
|
||||
{
|
||||
"key" : "JD_COOKIE",
|
||||
"value" : "pt_key=AAJfjaNrADASxxxxxxxKpfDaZ2pSBOYTxtPqLK8U1Q;pt_pin=lxxxxx5;"
|
||||
},
|
||||
{
|
||||
"key" : "TG_BOT_TOKEN",
|
||||
"value" : "13xxxxxx80:AAEkNxxxxxxzNf91WQ"
|
||||
},
|
||||
{
|
||||
"key" : "TG_USER_ID",
|
||||
"value" : "12xxxx206"
|
||||
},
|
||||
{
|
||||
"key" : "PLANT_BEAN_SHARECODES",
|
||||
"value" : ""
|
||||
},
|
||||
{
|
||||
"key" : "FRUITSHARECODES",
|
||||
"value" : ""
|
||||
},
|
||||
{
|
||||
"key" : "PETSHARECODES",
|
||||
"value" : ""
|
||||
},
|
||||
{
|
||||
"key" : "SUPERMARKET_SHARECODES",
|
||||
"value" : ""
|
||||
},
|
||||
{
|
||||
"key" : "CRONTAB_LIST_FILE",
|
||||
"value" : "crontab_list.sh"
|
||||
}
|
||||
],
|
||||
"exporting" : false,
|
||||
"id" : "18af38bc0ac37a40e4b9608a86fef56c464577cc160bbdddec90155284fcf4e5",
|
||||
"image" : "akyakya/jd_scripts",
|
||||
"is_ddsm" : false,
|
||||
"is_package" : false,
|
||||
"links" : [],
|
||||
"memory_limit" : 0,
|
||||
"name" : "jd_scripts",
|
||||
"network" : [
|
||||
{
|
||||
"driver" : "bridge",
|
||||
"name" : "bridge"
|
||||
}
|
||||
],
|
||||
"network_mode" : "default",
|
||||
"port_bindings" : [],
|
||||
"privileged" : false,
|
||||
"shortcut" : {
|
||||
"enable_shortcut" : false,
|
||||
"enable_status_page" : false,
|
||||
"enable_web_page" : false,
|
||||
"web_page_url" : ""
|
||||
},
|
||||
"use_host_network" : false,
|
||||
"volume_bindings" : [
|
||||
{
|
||||
"host_volume_file" : "/docker/jd_scripts/logs",
|
||||
"mount_point" : "/scripts/logs",
|
||||
"type" : "rw"
|
||||
}
|
||||
]
|
||||
}
|
220
githubAction.md
Normal file
@@ -0,0 +1,220 @@
|
||||
## Github Action使用教程说明
|
||||
- Fork [此仓库项目](https://github.com/lxk0301/scripts) > 点击右上角fork按钮即可, [再不会可看此图](icon/fork.png)
|
||||
|
||||
- 然后参考github@ruicky写的特别详细的小白教程[@ruicky教程](https://ruicky.me/2020/06/05/jd-sign/) (**注:此 [@ruicky教程](https://ruicky.me/2020/06/05/jd-sign/) 里面获取ck的方法不对。参考下面两种获取京东cookie的方式才对.**)
|
||||
|
||||
|
||||
|
||||
### 注意几个地方就行
|
||||
|
||||
|
||||
|
||||
#### **fork后必须修改一下文件,才能执行定时任务**
|
||||
- 比如修改一下`README.md`文件(enter键回车),再提交
|
||||
- 不知怎么修改README.md文件的看[这个图](icon/action3.png);
|
||||
|
||||
|
||||
|
||||
|
||||
#### 京东Cookie
|
||||
|
||||
- Secret新增`JD_COOKIE`,填入cookie信息,多账号的cookie, 使用`&`或者换行隔开(两种方法)
|
||||
|
||||
- 方式已一:`&`号隔开示例(注:后面的英文引号`;`不可缺失)
|
||||
如 `账号一cookie&账号二cookie&账号三cookie`,再多账号就依次类推即可
|
||||
```
|
||||
pt_key=xxx1;pt_pin=xxx1;&pt_key=xxx2;pt_pin=xxx2;&pt_key=xxx3;pt_pin=xxx3;
|
||||
```
|
||||
- 方式二:按`Enter`键换行隔开示例(这里给下三个账号的示例)
|
||||
```
|
||||
pt_key=bbbbbbbbbbbbbb;pt_pin=aaaaaaa;
|
||||
pt_key=cccccccc;pt_pin=dddddddd;
|
||||
pt_key=eeeeeeeee;pt_pin=ffffffff;
|
||||
```
|
||||
- 京东cookie获取看这里
|
||||
- [浏览器获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie2.md)
|
||||
- IOS代理软件(Surge, Quantumult X, Loon)等用户有使用过BoxJs的,可在BoxJs里面提取京东cookie(打开BoxJs -> 底部中间的 `应用` -> NobyDa脚本订阅 -> 京东(多合一签到) -> 点击会话右上方的三个点点 -> 修改会话 -> 全选复制即可),再不会看此[图文教程](icon/jd8.png)
|
||||
|
||||
|
||||
#### Action里面cron时间
|
||||
|
||||
- 此时间是国际标准时间,与北京时间不同,github action写16点才表示北京时间0点,具体可参考下面两个链接写cron
|
||||
|
||||
- [参考链接一](https://datetime360.com/cn/utc-beijing-time/) , [参考链接二](http://www.timebie.com/cn/universalbeijing.php)
|
||||
|
||||
- 根据使用经验发现github action 会有延迟现象,一般会延迟15分钟左右吧。比如action设置`北京时间16:00`运行,action其实要`16:15左右`才会执行脚本的。
|
||||
|
||||
|
||||
|
||||
#### 如何查看Action运行情况
|
||||
|
||||
- [查看运行状态](https://raw.githubusercontent.com/lxk0301/scripts/master/icon/action1.png)
|
||||
|
||||
- [查看运行日志](https://raw.githubusercontent.com/lxk0301/scripts/master/icon/action2.png)
|
||||
|
||||
|
||||
|
||||
#### 如何禁用单个或者多个脚本(Action)
|
||||
|
||||
- 操作步骤[看此图](./icon/disable-action.jpg)
|
||||
|
||||
|
||||
|
||||
#### Fork后Action未运行
|
||||
|
||||
> 是因为`/.github/workflows/`路径里面的`.yml`后缀文件里面的cron时间未到,如需立马看到效果
|
||||
|
||||
- 方法:在自己仓库,手动点击仓库的右上角`star图标按钮`即可,稍后就能看到运行
|
||||
- 注:之后如果想单独运行某一个脚本(此处的前提条件是执行过上面的方法),手动点击 Run workflow [根据此图片示例操作](https://user-images.githubusercontent.com/21308593/93980945-e28ab000-fdb1-11ea-977c-c50705e79ac3.png) ,再次点一下`Actions`图标即可看到效果(或者等待10秒左右也可)
|
||||
|
||||
|
||||
|
||||
#### 自动同步Fork后的代码
|
||||
|
||||
> 此部分内容由tg@wukongdada和tg@goukey提供
|
||||
|
||||
- 方案A - 强制远程分支覆盖自己的分支(**新手推荐使用**)
|
||||
|
||||
1. 参考tg@wukongdada这篇教程 [保持自己github的forks自动和上游仓库同步的教程](https://github.com/lxk0301/scripts/blob/master/backUp/gitSync.md) , 安装[pull插件](https://github.com/apps/pull) 并确认此项目已在pull插件的作用下(参考@twukongdada这篇教程文中1-d)
|
||||
|
||||
2. 确保.github/pull.yml文件正常存在,yml内上游作者填写正确(此项目已填好,无需更改)。
|
||||
|
||||
3. 确保pull.yml里面是`mergeMethod: hardreset`(默认就是`hardreset`)。
|
||||
|
||||
4. ENJOY!上游更改三小时左右就会自动发起同步。
|
||||
```
|
||||
# 方案A可参考这里
|
||||
version: "1"
|
||||
rules: # Array of rules
|
||||
- base: master # Required. Target branch
|
||||
upstream: lxk0301:master # Required. Must be in the same fork network.
|
||||
mergeMethod: hardreset # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
|
||||
mergeUnstable: true # Optional, merge pull request even when the mergeable_state is not clean. Default: false
|
||||
```
|
||||
- 方案B - 保留自己仓库已修改过的文件(**需修改脚本或者提PR的使用**)
|
||||
|
||||
> 上游变动后pull插件会自动发起pr,但如果有冲突需要自行**手动**确认。
|
||||
> 如果上游更新涉及workflow里的文件内容改动,需要自行**手动**确认。
|
||||
|
||||
1. 参考tg@wukongdada这篇教程 [保持自己github的forks自动和上游仓库同步的教程](https://github.com/lxk0301/scripts/blob/master/backUp/gitSync.md) , 安装[pull插件](https://github.com/apps/pull) 并确认此项目已在pull插件的作用下(参考@twukongdada这篇教程文中1-d)
|
||||
2. 确保.github/pull.yml文件正常存在,yml内上游作者填写正确(此项目已填好,无需更改)。
|
||||
3. 将pull.yml里面的`mergeMethod: hardreset`修改为`mergeMethod: merge`保存。
|
||||
4. ENJOY!上游更改三小时左右就会自动发起同步。
|
||||
```
|
||||
# 方案B可参考这里
|
||||
version: "1"
|
||||
rules: # Array of rules
|
||||
- base: master # Required. Target branch
|
||||
upstream: lxk0301:master # Required. Must be in the same fork network.
|
||||
mergeMethod: merge # Optional, one of [none, merge, squash, rebase, hardreset], Default: none.
|
||||
mergeUnstable: true # Optional, merge pull request even when the mergeable_state is not clean. Default: false
|
||||
```
|
||||
- 方案C - 利用github-action定时cron更新同步(**新手推荐使用**)
|
||||
|
||||
> 效果和方案A一样(即:强制更新覆盖)
|
||||
|
||||
新建secret,`Name`为`PAT`,填写的`Value`值需要去申请Personal access tokens,申请教程[看此处](https://www.jianshu.com/p/bb82b3ad1d11) 记得勾选`repo`权限就行
|
||||
|
||||
|
||||
|
||||
#### 下方提供使用到的 **Secrets全集合**
|
||||
|
||||
| Name | 归属 | 属性 | 说明 |
|
||||
| :---------------------: | :----------: | --------- | ------------------------------------------------------------ |
|
||||
| `JD_COOKIE` | 京东 | 必须 | 京东cookie,多个账号的cookie使用`&`隔开或者换行。具体获取参考[浏览器获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie.md) 或者 [插件获取京东cookie教程](https://github.com/lxk0301/scripts/blob/master/backUp/GetJdCookie2.md) |
|
||||
| `JD_BEAN_STOP` | 京东 | 非必须 | 自定义延迟签到,单位毫秒. 默认分批并发无延迟. 延迟作用于每个签到接口, 如填入延迟则切换顺序签到(耗时较长),如需填写建议输入数字`1` |
|
||||
| `JD_BEAN_SIGN_STOP_NOTIFY`| 京东 | 非必须 | `jd_bean_sign.js`脚本运行后不推送签到结果通知,默认推送,填`true`表示不发送通知 |
|
||||
| `JD_BEAN_SIGN_NOTIFY_SIMPLE`| 京东 | 非必须 | `jd_bean_sign.js`脚本运行后推送签到结果简洁版通知,默认推送全部签到结果,填`true`表示推送简洁通知,[效果图](./icon/bean_sign_simple.jpg) |
|
||||
| `JD_DEBUG` | 脚本打印log | 非必须 | 运行脚本时,是否显示log,默认显示。改成false表示不显示,注重隐私的人可以在设置secret -> `Name:JD_DEBUG,Value:false` |
|
||||
| `PUSH_KEY` | 微信推送 | 非必须 | cookie失效推送[server酱的微信通知](http://sc.ftqq.com/3.version) |
|
||||
| `BARK_PUSH` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | cookie失效推送BARK这个APP,填写内容是app提供的`设备码`,例如:https://api.day.app/123 ,那么此处的设备码就是`123`,再不懂看 [这个图](icon/bark.jpg) |
|
||||
| `BARK_SOUND` | [BARK推送](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865) | 非必须 | bark推送声音设置,例如`choo`,具体值请在`bark`-`推送铃声`-`查看所有铃声` |
|
||||
| `TG_BOT_TOKEN` | telegram推送 | 非必须 | tg推送,填写自己申请[@BotFather](https://t.me/BotFather)的Token,如`10xxx4:AAFcqxxxxgER5uw` , [具体教程](https://github.com/lxk0301/scripts/pull/37#issuecomment-692415594) |
|
||||
| `TG_USER_ID` | telegram推送 | 非必须 | tg推送,填写[@getuseridbot](https://t.me/getuseridbot)中获取到的纯数字ID, [具体教程](https://github.com/lxk0301/scripts/pull/37#issuecomment-692415594) |
|
||||
| `DD_BOT_TOKEN` | 钉钉推送 | 非必须 | 钉钉推送[官方文档](https://ding-doc.dingtalk.com/doc#/serverapi2/qf2nxq) ,只需`https://oapi.dingtalk.com/robot/send?access_token=XXX` 等于符号后面的XXX, 注:如果钉钉推送只填写`DD_BOT_TOKEN`,那么安全设置需勾选`自定义关键词`,内容输入输入`账号`即可,其他安全设置不要勾选 |
|
||||
| `DD_BOT_SECRET` | 钉钉推送 | 非必须 | 密钥,机器人安全设置页面,加签一栏下面显示的SEC开头的字符串 , 注:填写了`DD_BOT_TOKEN`和`DD_BOT_SECRET`,钉钉机器人安全设置只需勾选`加签`即可,其他选项不要勾选,再不懂看 [这个图](icon/DD_bot.png) |
|
||||
| `IGOT_PUSH_KEY` | iGot推送 | 非必须 | iGot聚合推送,支持多方式推送,确保消息可达。 [参考文档](https://wahao.github.io/Bark-MP-helper ) |
|
||||
| `PET_NOTIFY_CONTROL` | 东东萌宠推送开关 | 非必须 | 控制京东萌宠是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
||||
| `FRUIT_NOTIFY_CONTROL` | 东东农场推送开关 | 非必须 | 控制京东农场是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
||||
| `JD_JOY_REWARD_NOTIFY` | 宠汪汪兑换京豆推送开关 | 非必须 | 控制jd_joy_reward.js脚本是否静默运行,`false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息)
|
||||
| `JD_818_SHAREID_NOTIFY` | 京东818互助码通知开关 | 非必须 | 控制jd_818.js脚本是否在获取互助码后通知,`true`为是(发送推送通知消息),`false`为否(即:不发送推送通知消息) |
|
||||
| `JOY_FEED_COUNT` | 宠汪汪喂食数量 | 非必须 | 控制jd_joy_feedPets.js脚本喂食数量 ,可以填的数字10,20,40,80 , 其他数字不可. |
|
||||
| `JOY_HELP_FEED` | 宠汪汪帮好友喂食 | 非必须 | 控制jd_joy_steal.js脚本是否给好友喂食,`false`为否,`true`为是(给好友喂食) |
|
||||
| `JOY_RUN_FLAG` | 宠汪汪参加双人赛跑 | 非必须 | 控制jd_joy.js脚本是否参加双人赛跑,`false`为否,`true`为是,脚本默认是`true` |
|
||||
| `JD_JOY_REWARD_NAME` | 宠汪汪积分兑换多少京豆 | 非必须 | 目前可填值为`20`或者`500`,脚本默认`20`,`0`表示不兑换京豆 |
|
||||
| `MARKET_COIN_TO_BEANS` | 京小超兑换京豆数量 | 非必须 | 控制jd_blueCoin.js兑换京豆数量,可输入值为`20`或者`1000`的数字或者其他商品的名称,例如`碧浪洗衣凝珠` |
|
||||
| `MARKET_REWARD_NOTIFY` | 京小超兑换奖品推送开关 | 非必须 | 控制jd_blueCoin.js兑换奖品成功后是否静默运行, `false`为否(发送推送通知消息),`true`为是(即:不发送推送通知消息) |
|
||||
| `SUPERMARKET_UPGRADE` | 京小超自动升级 | 非必须 | 自动升级,顺序:解锁升级商品、升级货架,`true`表示自动升级,`false`表示关闭自动升级 |
|
||||
| `BUSINESS_CIRCLE_JUMP` | 京小超自动更换商圈 | 非必须 | 小于对方300热力值自动更换商圈队伍,`true`表示运行,`false`表示禁止 |
|
||||
| `SUPERMARKET_LOTTERY` | 京小超抽奖 | 非必须 | 每天运行脚本是否使用金币去抽奖,`true`表示抽奖,`false`表示不抽奖 |
|
||||
| `FRUIT_BEAN_CARD` | 农场使用水滴换豆卡 | 非必须 | 农场使用水滴换豆卡(如果出现限时活动时100g水换20豆,此时比浇水划算,推荐换豆),`true`表示换豆(不浇水),`false`表示不换豆(继续浇水),脚本默认是浇水 |
|
||||
| `UN_SUBSCRIBES` | jd_unsubscribe.js | 非必须 | 共四个参数,换行隔开. 四个参数分别表示`取关商品数量`,`取关店铺数量`,`遇到此商品不再进行取关`, `遇到此店铺不再进行取关`,[具体使用往下看](#取关店铺secret的说明)|
|
||||
| `FruitShareCodes` | 东东农场互助码 | 非必须 | 填写规则请看 [jdFruitShareCodes.js](https://github.com/lxk0301/scripts/blob/master/jdFruitShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) |
|
||||
| `PETSHARECODES` | 东东萌宠互助码 | 非必须 | 填写规则请看 [jdPetShareCodes.js](https://github.com/lxk0301/scripts/blob/master/jdPetShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) |
|
||||
| `PLANT_BEAN_SHARECODES` | 种豆得豆互助码 | 非必须 | 填写规则请看 [jdPlantBeanShareCodes.js](https://github.com/lxk0301/scripts/blob/master/jdPlantBeanShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) |
|
||||
| `SUPERMARKET_SHARECODES`| 京小超商圈互助码 | 非必须 | 填写规则请看 [jdSuperMarketShareCodes.js](https://github.com/lxk0301/scripts/blob/master/jdSuperMarketShareCodes.js) 或见下方[互助码的填写规则](#互助码的填写规则) |
|
||||
|
||||
|
||||
|
||||
##### 互助码的填写规则
|
||||
|
||||
> 互助码如何获取:运行相应脚本后,在日志里面可以找到。(如何查看日志上面有写,详见 如何查看action运行情况)
|
||||
|
||||
同一个京东账号的好友互助码用@隔开,不同京东账号互助码用&或者换行隔开,下面给一个文字示例和具体互助码示例说明
|
||||
|
||||
两个账号各两个互助码的文字示例:
|
||||
|
||||
```
|
||||
京东账号1的shareCode1@京东账号1的shareCode2&京东账号2的shareCode1@京东账号2的shareCode2
|
||||
```
|
||||
|
||||
两个账号各两个互助码的真实示例:
|
||||
```
|
||||
0a74407df5df4fa99672a037eec61f7e@dbb21614667246fabcfd9685b6f448f3&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6&6fbd26cc27ac44d6a7fed34092453f77@61ff5c624949454aa88561f2cd721bf6
|
||||
```
|
||||
|
||||
|
||||
|
||||
#### 取关店铺secret的说明
|
||||
|
||||
> secret依次是`取关商品数`,`取关店铺数`,`遇到此商品不再进行取关`,`遇到此店铺不再进行取关`
|
||||
|
||||
例如我要取关 `100`个商品,`100`个店铺,商品遇到商品关键字 `iPhone12` 停止取关,店铺遇到 `Apple京东自营旗舰店` 不再取关
|
||||
则使用`换行`或者`&`隔开即可,
|
||||
下面给出换行隔开示例:
|
||||
|
||||
```
|
||||
100
|
||||
100
|
||||
iPhone12
|
||||
Apple京东自营旗舰店
|
||||
```
|
||||
|
||||
下面给出`&`符号隔开示例:
|
||||
```
|
||||
100&100&iPhone12&Apple京东自营旗舰店
|
||||
```
|
||||
|
||||
#### 关于脚本推送通知(微信server酱推送通知,bark app推送通知,telegram机器人推送通知,钉钉机器人推送通知,iGot聚合推送)
|
||||
|
||||
> 如果你填写了上面五种推送通知方式中的某一个通知所需secret,那么脚本通知情况如下:
|
||||
|
||||
> 目前默认只有jd_fruit.js,jd_pet.js,jd_bean_sign.js,jd_818.js四个脚本每次运行后都通知
|
||||
|
||||
```
|
||||
jd_plantBean.js是每周一收集京豆后通知一次,
|
||||
jd_joy_reward.js是每次兑换到了京豆通知一次,
|
||||
jd_blueCoin.js是每次兑换到了奖品通知一次,
|
||||
jd_818.js是每次获取新的互助码会通知一次,以帮助您快速上车,
|
||||
其余的脚本平常运行都是不通知,只有在京东cookie失效后,才会推送通知
|
||||
```
|
||||
- 如果填写了推送通知所需的secret后,运行上面有通知的脚本,还没收到通知的话,请自行查看action运行日志(如何查看日志教程请看上面的`如何查看action运行情况`),里面会推送通知发送失败的log
|
||||
|
||||
|
||||
|
||||
##### 参考文献
|
||||
[GitHub Actions 手动触发方式进化史](https://p3terx.com/archives/github-actions-manual-trigger.html)
|
||||
|
||||
[GitHub Actions 入门教程](https://p3terx.com/archives/github-actions-started-tutorial.html)
|
||||
|
||||
[github@ruicky教程](https://ruicky.me/2020/06/05/jd-sign/)
|
140
iCloud.md
Normal file
@@ -0,0 +1,140 @@
|
||||
## 1.安装 Node.js 环境
|
||||
|
||||
[下载地址](https://nodejs.org/zh-tw/download/ )
|
||||
|
||||
根据自己的操作系统下载
|
||||
|
||||
傻瓜式安装,一直下一步即可。
|
||||
|
||||
|
||||
|
||||
## 2.下载源码
|
||||
|
||||

|
||||
|
||||
点击红框处下载压缩包
|
||||
|
||||
## 3.安装依赖、增加入口文件、增加cookie
|
||||
|
||||
压缩包解压后进入项目文件夹
|
||||
|
||||
- Windows 用户按住 **shift** 点击右键,点击 **在此处打开命令窗口**
|
||||
- Mac 用户通过终端,自行进入该文件夹
|
||||
|
||||
在命令行内输入 `npm i `,等待运行完成。
|
||||
|
||||
此时,项目文件夹内会多出一个 `node_modules`文件夹
|
||||
|
||||
**增加入口文件**
|
||||
|
||||
方案一:同一个仓库下同一个时间,执行多个脚本
|
||||
|
||||
在项目文件夹内新建 `index.js`
|
||||
|
||||
编辑文件
|
||||
|
||||
```javascript
|
||||
'use strict';
|
||||
exports.main_handler = async (event, context, callback) => {
|
||||
require('./jd_xtg1.js') //这里写你想要的脚本
|
||||
require('./jd_xtg2.js') //这里写你想要的脚本
|
||||
require('./jd_xtg3.js') //这里写你想要的脚本
|
||||
}
|
||||
|
||||
```
|
||||
此时,同一时间点下,会同时执行多个脚本,触发器触发后,index.js文件中require()下的所有脚本都会被执行
|
||||
|
||||
方案二:同一个仓库下不同的时间点,分别执行不同的脚本(类似GitHub Action执行机制)
|
||||
|
||||
在项目文件夹内新建 `index.js`
|
||||
|
||||
编辑文件
|
||||
|
||||
```javascript
|
||||
'use strict';
|
||||
exports.main_handler = async (event, context, callback) => {
|
||||
for (const v of event["Message"].split("\r\n")) {
|
||||
console.log(v);
|
||||
require(`./${v}.js`)
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
此时触发管理按照下图中进行设置,附加信息选择“是”,内容填写需要传递执行的具体脚本文件名,以回车键换行。触发器触发后,附加信息栏内的脚本会被执行,设置多个不同时间点的触发器达到类似GitHub Action的效果
|
||||
|
||||
|
||||
[](https://imgchr.com/i/B20KxI)
|
||||
[](https://imgchr.com/i/BRCG0H)
|
||||
|
||||
注意:方案一与方案二不能混合到同一个index.js文件中使用,同一个仓库下,二者只能选择其一
|
||||
|
||||
|
||||
**增加cookie**
|
||||
|
||||
打开项目文件内的 `jdCookie.js`
|
||||
|
||||
在最上面的 `CookieJDs`里写入 cookie ,多个账号以逗号分隔
|
||||
|
||||
例如
|
||||
|
||||
```javascript
|
||||
let CookieJDs = [
|
||||
'pt_key=xxx;pt_pin=xxx;',
|
||||
'pt_key=zzz;pt_pin=zzz;',
|
||||
'pt_key=aaa;pt_pin=xxxaaa'
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
|
||||
## 4.上传至腾讯云
|
||||
|
||||
[腾讯云函数地址]( https://console.cloud.tencent.com/scf/index )
|
||||
|
||||
编写函数
|
||||
|
||||
登录后,点击管理控制台
|
||||
|
||||
单击左侧导航栏**函数服务**,进入“函数服务”页面。
|
||||
在页面上方选择一个地域,最好选择离你常用地区近点的,不至于导致账号异常。单击**新建**。如下图所示:
|
||||
|
||||

|
||||
|
||||
在“新建函数”页面填写函数基础信息,单击**下一步**。如下图所示:
|
||||
|
||||

|
||||
|
||||
函数名称:可以自定义,比如为jd。
|
||||
运行环境:选择 “Nodejs 12.16”。
|
||||
创建方式:选择 “空白函数”。
|
||||
|
||||
确保环境为Nodejs 12.16,执行方法改为:index.main_handler,提交方式建议选本地文件夹,然后从GitHub项目克隆Zip压缩包,解压成文件夹,然后点击这个上传把文件夹上传进来(记得node_modules文件夹一并上传),完了后点击下面的高级设置。
|
||||
|
||||

|
||||
|
||||
内存用不了太大,64MB就够了(64M内存,免费时长6,400,000秒,内存与免费时长大致关系可以参看云函数官方说明),超时时间改为最大的900秒,然后点击最下面的完成。
|
||||
|
||||

|
||||
|
||||
## 5.设置触发器
|
||||
|
||||
点击刚创建的函数
|
||||
|
||||

|
||||
|
||||
点击如图所示
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
想进阶使用触发器的自行查看本文中方案一和方案二中的说明
|
||||
|
||||
关于触发周期中的自定义触发周期,使用的是 Cron表达式,这个自行学习下吧
|
||||
|
||||
[Corn文档](https://cloud.tencent.com/document/product/583/9708#cron-.E8.A1.A8.E8.BE.BE.E5.BC.8F)
|
||||
|
||||
|
||||
|
||||
点击提交,所有流程就结束了。
|
BIN
icon/DD_bot.png
Normal file
After Width: | Height: | Size: 54 KiB |
BIN
icon/Snipaste_2020-08-28_09-31-42.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
icon/action1.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
icon/action2.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
icon/action3.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
icon/bark.jpg
Normal file
After Width: | Height: | Size: 424 KiB |
BIN
icon/bean_sign_simple.jpg
Normal file
After Width: | Height: | Size: 34 KiB |
BIN
icon/disable-action.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
icon/fork.png
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
icon/git1.jpg
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
icon/git10.jpg
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
icon/git11.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
icon/git12.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
icon/git13.jpg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
icon/git14.jpg
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
icon/git2.jpg
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
icon/git3.jpg
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
icon/git4.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
icon/git5.jpg
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icon/git6.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
icon/git7.png
Normal file
After Width: | Height: | Size: 160 KiB |
BIN
icon/git8.jpg
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
icon/git9.jpg
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
icon/iCloud1.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
icon/iCloud2.png
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
icon/iCloud3.png
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
icon/iCloud4.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
icon/jd1.jpg
Normal file
After Width: | Height: | Size: 625 KiB |
BIN
icon/jd2.jpg
Normal file
After Width: | Height: | Size: 208 KiB |
BIN
icon/jd3.jpg
Normal file
After Width: | Height: | Size: 163 KiB |
BIN
icon/jd4.jpg
Normal file
After Width: | Height: | Size: 256 KiB |
BIN
icon/jd5.png
Normal file
After Width: | Height: | Size: 108 KiB |
BIN
icon/jd6.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
icon/jd7.png
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
icon/jd8.png
Normal file
After Width: | Height: | Size: 311 KiB |
BIN
icon/jd_moneyTree.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
icon/jd_pet.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
icon/thanks.jpg
Normal file
After Width: | Height: | Size: 63 KiB |