nodejs + github actions 实现百度贴吧自动签到
前段时间想用云函数的方式进行百度贴吧的签到,无奈云函数的超时时间最多只能为60秒,还没开始签就结束了,所以就改用了 github actions执行 nodejs 脚本来实现。
开源地址: https://github.com/xuedingmiaojun/tbautosign
action.yml
name: nodejs tb autosign
on:
push:
gollum:
schedule:
- cron: '0 11,21 * * *'
jobs:
one:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# 使用 node:10
- name: use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
# npm install
- name: npm install and do sign
env:
BDUSS: ${{ secrets.BDUSS }}
run: |
npm install
node index.js
网页中登录贴吧,然后打开『开发者工具』,找到 BDUSS
Application->Storage->Cookies
多用户按如下格式添加。
BDUSS1&&BDUSS2
默认actions是处于禁止的状态,需要手动开启。
push