Giter VIP home page Giter VIP logo

superstar-checkin's Introduction

Superstar Checkin

超星学习通自动签到工具

GitHub package.json dependency version (prod) discord

特色:

  • 通过 IM 协议实时获取签到信息,而不是每隔一定时间请求服务器

  • 包含 QQ 机器人,实时向指定的群通知程序状态

  • 支持使用任何一张二维码进行二维码签到,即使二维码已经过期(直接在指定群内发送二维码即可)

功能(已实现部分)

  • 自动取 Cookie,过期自动更新

  • 支持通过学习通 IM 协议实时获取签到推送

  • 在群内发送提醒并自动签到

  • 通过 QQ 机器人接收群内发送的二维码实现二维码签到

    本功能只需要一张已过期的二维码就可以

  • 支持多用户共同签到

  • 根据课程设置签到经纬度以及位置名称

    请使用此网页拾取坐标

  • 支持通过周次设定签到的地址,适用于实验课和正课在不同地点的情况

  • 手动签到

    机器人命令:签到 {aid} [enc(二维码签到时)|courseId(位置签到时。不需要提交位置可以不填)]

  • Docker 和 Docker Compose 部署

  • 通过 REST API 设置课程信息

部署方法

使用 Docker Compose 部署

  1. 下载 docker-compose.yamlconfig.example.yaml,将它们放在一个文件夹中
  2. config.example.yaml 重命名为 config.yaml
  3. 修改 config.yaml 中的配置项
  4. docker compose up

使用 NixOS 部署

  1. 在你的系统 Flake 中,引入本项目

    inputs.superstar-checkin.url = "github:clansty/superstar-checkin";
  2. 在系统配置的某个 Module 中填写配置项(查看示例

  3. nixos-rebuild switch

可以使用 systemctl status superstar-checkin 来查看状态

手动部署

  1. 安装 NodeJS 14 以上版本
  2. yarn install
  3. cp config.example.yaml config.yaml 并在 config.yaml 中填写配置项。配置文件中自带说明,请参考
  4. yarn build
  5. yarn start

提示:机器人使用的账号必须已经在 oicq 框架上登录过

限制

(据说)学习通禁止腾讯云阿里云这种 IP 签到,所以需要部署在家庭宽带下

参考

本程序借鉴了一些前人的项目:

更多有关学习通签到的项目值得尝试

项目地址 开发语言 备注
https://github.com/cyanray/cx-auto-sign C# 超星学习通自动签到工具,通过IM协议监测签到活动。
https://github.com/mkdir700/chaoxing_auto_sign Python 超星学习通自动签到脚本&多用户多任务&API
https://github.com/PrintNow/ChaoxingSign PHP PHP版超星自动签到,支持多用户,二次开发便捷!
https://github.com/Wzb3422/auto-sign-chaoxing TypeScript 超星学习通自动签到,梦中刷网课
https://github.com/Huangyan0804/AutoCheckin Python 学习通自动签到,支持手势,二维码,位置,拍照等
https://github.com/aihuahua-522/chaoxing-testforAndroid Java 学习通(超星)自动签到
https://github.com/yuban10703/chaoxingsign Python 超星学习通自动签到
https://github.com/SSmJaE/XueXiTonsSign_Electron TypeScript 基于Electron,桌面端,GUI,签到队列

superstar-checkin's People

Contributors

beiyanyunyi avatar clansty avatar moeshin avatar summonhim avatar zxilly 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  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  avatar  avatar  avatar

superstar-checkin's Issues

node.js调试时输入yarn start报错

TypeError: Cannot read properties of undefined (reading 'replace')
at Object.toPortablePath (E:\GitHup\xuexitong\superstar-checkin-main.pnp.cjs:3066:9)
at PosixFS.mapToBase (E:\GitHup\xuexitong\superstar-checkin-main.pnp.cjs:5637:18)
at PosixFS.mkdirSync (E:\GitHup\xuexitong\superstar-checkin-main.pnp.cjs:5542:39)
at URLFS.mkdirSync (E:\GitHup\xuexitong\superstar-checkin-main.pnp.cjs:5542:24)
at createDataDir (E:\GitHup\xuexitong\superstar-checkin-main.yarn\cache\oicq-npm-2.3.1-3c9e6879fd-7f15733fdb.zip\node_modules\oicq\lib\client.js:574:12)
at new Client (E:\GitHup\xuexitong\superstar-checkin-main.yarn\cache\oicq-npm-2.3.1-3c9e6879fd-7f15733fdb.zip\node_modules\oicq\lib\client.js:49:21)
at E:\GitHup\xuexitong\superstar-checkin-main\build\providers\bot.js:14:11
at new Promise ()
at loginBot (E:\GitHup\xuexitong\superstar-checkin-main\build\providers\bot.js:11:24)
at E:\GitHup\xuexitong\superstar-checkin-main\build\index.js:40:30

[Feature建议] 建议支持QQ机器人框架外置

oicq这个QQ机器人库的扫码登陆属实是不太好用, 我在docker-compose里部署的, 每次程序重启都得重新扫码, 没法从本地缓存的凭证里登陆机器人, 即使我已经将/app/data文件夹映射出来.
给未来的人留下一个方案:
先docker-compose up -d, 然后docker attach main_superstar, 摁一下回车, 用手机扫码登陆, 然后再摁一下回车, 看到机器人登陆成功的log后, Ctrl+P Ctrl+Q, 可以在不终止这个shell的情况下detach这个容器.但是每次服务器重启或者容器重启都得进行如上过程
所以我希望可以支持外置机器人框架, 这样就可以使用更加完善的mirai或者go-cqhttp.
仅需支持目前通用的 OneBot 协议就可以链接几乎市面上的所有QQ机器人框架, 我建议本项目使用OneBot中的正向Websocket.

docker 一直在报错

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined

at new NodeError (node:internal/errors:387:5)

at validateString (node:internal/validators:121:11)

at Object.isAbsolute (node:path:1157:5)

at VirtualFS.mapToBase (/app/.pnp.cjs:5705:24)

at VirtualFS.mkdirSync (/app/.pnp.cjs:5542:39)

at PosixFS.mkdirSync (/app/.pnp.cjs:5542:24)

at URLFS.mkdirSync (/app/.pnp.cjs:5542:24)

at createDataDir (/app/.yarn/cache/oicq-npm-2.3.1-3c9e6879fd-7f15733fdb.zip/node_modules/oicq/lib/client.js:574:12)

at new Client (/app/.yarn/cache/oicq-npm-2.3.1-3c9e6879fd-7f15733fdb.zip/node_modules/oicq/lib/client.js:49:21)

at /app/providers/bot.js:14:11 {

code: 'ERR_INVALID_ARG_TYPE'

}
禁用机器人组件后恢复正常了

二维码签到

用的是容器 QQ群里发二维码 相同照片有时候解析 有时候不解析 一手动签到 程序就会卡死

遇到问题了

image
这个是什么愿意呢,现在只能通过命令手动签到,怎么实时监测签到实现自动签到呢

qq登录提示版本过低

[2023-03-22T09:35:19.417] [ERROR] [aPad] - [禁止登录]您好,您当前使用的版本过低,前往QQ官网im.qq.com下载新版QQ。

运行时输出错误

[Error - 07:46:21] Starting client failed
Launching server using command deno failed.

项目能运行,但提示错误

调试出错

[2022-04-29T00:08:35.094] [ERROR] [Android:1265744892] - failed to send: [Group: NaN]
undefined(1)
Waiting for the debugger to disconnect...
node:internal/process/promises:279
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "#".] {
code: 'ERR_UNHANDLED_REJECTION'
}
Waiting for the debugger to disconnect...
Waiting for the debugger to disconnect...

提示错误代码:
const info = (...message) => {
    console.info([${date()}][INFO], ...message);
};

出现了看不懂的错误

image
shouji
首先,版本是 12.16 以上版本的

image
其次,配置文件也是正确的

MK`HBSKCRZLLP D_6IA 9)E
最后,出现了如图错误(我是小白,看不懂)

关于签到码签到

你好,程序好像不是很支持签到码签到,为啥过了两分钟才签到,
image

多用户签到的一个可能的风险

Basic Information

  • System: Windows Server 2016
  • Version: main 2b8e6e0
  • Log: -
  • Node Version: v16.13.1
  • Bot Report: -

Description

多用户签到以第一个用户的课程信息为准的话,第一个用户有而其他用户没有的课程,在课程签到信息发布后,其他用户也会签到,即使他们不在课程内,这个设计感觉挺危险的。

IM 消息处理时空指针

[2022/4/28 1:42:05][ERROR] 处理 IM 消息时出现异常,可能不是活动消息 TypeError: Cannot read properties of undefined (reading 'includes')
    at exports.default (/app/handlers/handleEasemobMessage.js:32:44)
    at e.onTextMessage (/app/providers/easemob.js:69:44)
    at p (/app/sdk/Easemob-chat-3.6.3.js:2:41491)
    at e.N._metapayload (/app/sdk/Easemob-chat-3.6.3.js:2:97133)
    at E.y.onmessage (/app/sdk/Easemob-chat-3.6.3.js:2:170528)
    at E.o.dispatchEvent (/app/sdk/Easemob-chat-3.6.3.js:2:72283)
    at /app/sdk/Easemob-chat-3.6.3.js:2:188907
    at Array.forEach (<anonymous>)
    at E._transportMessage (/app/sdk/Easemob-chat-3.6.3.js:2:188872)
    at u.i.emit (/app/sdk/Easemob-chat-3.6.3.js:1:4270)

Docker 运行的,没 sourcemap 可能不太好定位。

关于手势签到

你好,支持手势签到嘛,没看到readme里面写,倒是看见了下面借鉴的项目有

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.