-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
370 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
|
||
__pycache__ | ||
build | ||
dist | ||
__pycache__ | ||
env | ||
*.bat | ||
*.json | ||
*.spec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,39 @@ | ||
# weiban-tool | ||
<h1 align="center">安全微伴自动刷课助手</h1> | ||
<p align="center" class="shields"> | ||
<img src="https://badges.toozhao.com/badges/01HAMCFS652W02Z5H3CE02M4JY/blue.svg" alt="Visitors"/> | ||
</p> | ||
|
||
安全微伴自动刷课助手 | ||
相关项目:[安全微伴题库](https://github.com/pooneyy/WeibanQuestionsBank) | 安全微伴自动刷课助手 | ||
|
||
[原项目](https://github.com/Coaixy/weiban-tool)作者已停止维护,我在原项目基础上增加多账号的支持 | ||
### 项目介绍 | ||
|
||
### 使用方法 | ||
安全微伴自动刷课助手(多账号版),脱胎于[Coaixy/weiban-tool](https://github.com/Coaixy/weiban-tool),在原项目基础上增加多账号的支持,可以同时进行多个账号的学习任务。 | ||
|
||
1. 登录[安全微伴 (mycourse.cn)](http://weiban.mycourse.cn/#/login)。 | ||
### 使用说明 | ||
|
||
2. 在浏览器地址栏运行 | ||
1. 运行`main.py` 或者 [main.exe](https://github.com/pooneyy/weiban-tool/releases)。 | ||
|
||
```javascript | ||
javascript:(function(){data=JSON.parse(localStorage.user);prompt('',JSON.stringify({token:data['token'],userId:data['userId'], tenantCode:data['tenantCode'], userProjectId: data['preUserProjectId'], realName: data['realName']}));})(); | ||
``` | ||
2. **支持验证码识别**,验证码识别使用[TrueCaptcha](https://truecaptcha.org/),会提示你输入`userid`和`apikey`,注册的方法此处不过多赘述。 | ||
|
||
浏览器地址栏如果吞掉了“`javascript:`”,请手动加上。 | ||
需要提醒的是,这是一个付费服务,每个账号每天享有30次免费识别服务,每个账号总共享有100次免费识别服务。 | ||
|
||
或者你可以将上述脚本[添加到收藏夹](https://www.qiuyelin.com/getWei-banToken.html),直接在登录后的页面上运行添加进收藏夹的脚本。 | ||
关于资费,1美元可以识别3000次。可以使用PayPal国区支付,关于汇率,2023年9月18日,使用PayPal,$1USD=¥7.56CNY。 | ||
|
||
3. 复制弹窗内的内容,**按照格式**添加到`config.json`。(格式不对会报错) | ||
**值得一提的是,你可以跳过这一步骤,登录时将手动输入验证码。** | ||
|
||
[![1662441411827.png](http://png.eot.ooo/i/2022/09/06/6316d7c7f3567.png)](http://png.eot.ooo/i/2022/09/06/6316d7c7f3567.png) | ||
3. 按照提示录入账号密码,可同时依次输入多个账号,会记录上一个账号的学校名称,当有多个账号来自同一个学校,可以不用重复输入学校名。 | ||
|
||
4. 以`UTF-8`的编码方式创建`config.json`文件。其内容格式如下: | ||
4. 按`Ctrl`+`C`结束录入账号,开始登录,如果在第二步没有输入`userid`和`apikey`,会提示输入验证码。 | ||
|
||
> `config.json`: | ||
> | ||
> ```json | ||
> [ | ||
> {"token":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","userId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","tenantCode":"00000001","userProjectId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}, | ||
> {"token":"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy","userId":"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy","tenantCode":"00000002","userProjectId":"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy"}, | ||
> {"token":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz","userId":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz","tenantCode":"00000003","userProjectId":"zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz"}, | ||
> {#第4个账号信息#}, | ||
> {#第5个账号信息#}, | ||
> ... | ||
> {#第n个账号信息#} | ||
> ] | ||
> ``` | ||
5. 运行`main.py` 或者 [main.exe](https://github.com/pooneyy/weiban-tool/releases)。 | ||
![](https://telegraph-image1.pages.dev/file/e46f287b9733d3b8d21bc.png) | ||
|
||
### 更新日志 | ||
|
||
```text | ||
版本 1.1 at 2022-09-06 15:08:08 | ||
优化:增加对多账户的支持。 | ||
版本 1.2 at 2022-09-07 14:02:39 | ||
优化:使用异步函数,提高多账户场景下任务执行效率,避免由于多个账户排队时任务流程过长,Token过期,导致后面的账户任务失败。 | ||
优化:使显示内容更简洁。 | ||
``` | ||
- 版本 1.1 at 2022-09-06 15:08:08 | ||
- 优化:增加对多账户的支持。 | ||
- 版本 1.2 at 2022-09-07 14:02:39 | ||
- 优化:使用异步函数,提高多账户场景下任务执行效率,避免由于多个账户排队时任务流程过长,Token过期,导致后面的账户任务失败。 | ||
- 优化:使显示内容更简洁。 | ||
|
||
- 版本 2.0 at 2023-09-18 21:57:16 | ||
- 优化:使用账号密码登录,登录相关的代码来自[Coaixy/weiban-tool/enco.py](https://github.com/Coaixy/weiban-tool/blob/bf08fe823953afa834b49fe8d7e7a1d5abf7e605/enco.py)。 |
Oops, something went wrong.