Coder Social home page Coder Social logo

skland-daily-attendance's Introduction

森空岛签到

使用 github action 定时执行森空岛各版面登岛检票和明日方舟每日签到任务

使用

Fork 项目

点击本仓库右上角 Fork 到自己的账号下

获取凭据

登录森空岛网页版后,打开 https://web-api.skland.com/account/info/hg 记下 content 字段的值

添加 Cookie 至 Secrets

点击Settings -> 点击选项卡 Secrets and variables -> 点击Actions -> New repository secret

建立名为 SKLAND_TOKEN 的 secret,值为上一步获取 content,最后点击 Add secret,如果需要多账号支持,请使用半角逗号,分割

推送服务

  • 支持 server 酱推送每日签到信息,建立名为 SERVERCHAN_SENDKEY 的 secret 填入你 server 酱的推送密钥

  • 支持 bark 推送每日签到信息,建立名为 BARK_URL 的 secret 填入你 bark 的推送地址,例如 https://api.day.app/xxxxxxxxxx/,支持自建服务器

最终可能有的 secrets 如下
Name Secret
SKLAND_TOKEN * 森空岛 token
多账号使用半角逗号,分割
SERVERCHAN_SENDKEY Server 酱推送密钥,可选
BARK_URL Bark 推送地址,可选

启动 Github Action

Actions 默认为关闭状态,Fork 之后需要手动执行一次,若成功运行其才会激活。

返回项目主页面,点击上方的Actions,再点击左侧的attendance,再点击Run workflow

至此,部署完毕。

注意:github actions 会对60天没有活动的仓库自动禁用,你可能要主动关注一下 github actions 的运行情况(一般会发邮件通知 actions 执行失败)

广告

推荐一款浏览器扩展——罗德岛远程指挥部 能在浏览器上监控博士您岛上的最新信息

skland-daily-attendance's People

Contributors

enpitsulin avatar maxcrazy1101 avatar moeyua avatar roo12589 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

skland-daily-attendance's Issues

签到报错 Error: 登录获取 cred 错误:Key: 'GrantV2Req.token' Error:Field validation for 'token' failed on the 'required' tag

/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/api/hypergryph.ts:21
    throw new Error(`登录获取 cred 错误:${data.msg}`)
          ^


Error: 登录获取 cred 错误:Key: 'GrantV2Req.token' Error:Field validation for 'token' failed on the 'required' tag
Key: 'GrantV2Req.appCode' Error:Field validation for 'appCode' failed on the 'required' tag
Key: 'GrantV2Req.type' Error:Field validation for 'type' failed on the 'required' tag
    at auth (/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/api/hypergryph.ts:21:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at doAttendanceForAccount (/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/index.ts:14:[20](https://github.com/Montaro2017/skland-daily-attendance/actions/runs/7433660332/job/20232471308#step:8:21))
    at async Promise.all (index 0)
    at <anonymous> (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:12:1)

getBinding返回值异常

{ code: 10000, message: '签名验证失败' }
我原来用的另一个自动签到脚本也一样的异常= =之前一直好的

请求支持登岛检票

简简单单抓个包:
https://zonai.skland.com/api/v1/score/checkin
方法:POST

请求示例:
{
"gameId": 1
}
gameId为对应版区的ID,对照关系如下:
1:明日方舟
2:来自星辰
3:终末地
4:泡姆泡姆
100:纳斯特港

响应示例:
{
"code": 0,
"message": "OK"
}

应该挺好实现吧…?(手动狗头)不过咱不会结合GitHub Action…拜托了xwx

Error: Process completed with exit code 1.

Run pnpm attendance

[email protected] attendance /home/runner/work/skland-daily-attendance/skland-daily-attendance
tsx main.ts

/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:111
const { code } = await auth(token)
^

TypeError: Cannot destructure property 'code' of '(intermediate value)' as it is undefined.
at doAttendanceForAccount (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:111:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 0)
at (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:152:1)

Node.js v18.18.2
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.
今早刚出的问题

运行报错:获取绑定角色错误:当前APP版本过低,请更新后使用

`/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:109
throw new Error('获取绑定角色错误:' + data.message)
^

Error: 获取绑定角色错误:当前APP版本过低,请更新后使用
at getBinding (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:109:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:116:18)`

于今天四点零七运行,提示报错,签到失败
是否是因为版本更新导致更换了接口?

登录获取 cred 错误

> tsx main.ts

/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/api/hypergryph.ts:21
    throw new Error(`登录获取 cred 错误:${data.msg}`)
          ^


Error: 登录获取 cred 错误:Key: 'GrantV2Req.token' Error:Field validation for 'token' failed on the 'required' tag
Key: 'GrantV2Req.appCode' Error:Field validation for 'appCode' failed on the 'required' tag
Key: 'GrantV2Req.type' Error:Field validation for 'type' failed on the 'required' tag
    at auth (/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/api/hypergryph.ts:21:11)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at doAttendanceForAccount (/home/runner/work/skland-daily-attendance/skland-daily-attendance/src/index.ts:[14](https://github.com/Morris-Lucifer/skland-daily-attendance/actions/runs/7282501120/job/19844961632#step:8:15):20)
    at async Promise.all (index 0)
    at <anonymous> (/home/runner/work/skland-daily-attendance/skland-daily-attendance/main.ts:12:1)

Node.js v[18](https://github.com/Morris-Lucifer/skland-daily-attendance/actions/runs/7282501120/job/19844961632#step:8:19).18.2
 ELIFECYCLE  Command failed with exit code 1.

这是什么原因呢?

签到执行出错

应该是笨笨鹰角换字段名称或者是什么其他变动了,不过甲流刚好可能暂时处理不了先放放

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.