Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ name: 刷课

on:
push:
branches: [ actions ]

branches: [ main ]
#是否开始每天8点定时刷课,若要开启请把下面两行注释去掉
#schedule:
# - cron: "0 8 * * *"

jobs:
run_demo_actions:
Start:
runs-on: ubuntu-latest # 在最新版本的 Ubuntu 操作系统环境下运行
steps: # 要执行的步骤
- name: 拷贝代码
Expand All @@ -22,4 +25,4 @@ jobs:


- name: Run main.py
run: python main.py -u 15092321932 -p 9854264yjn -l 244403509
run: python main.py -u 17609003132 -p b1628361522b -l 257100786
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,24 @@ build/
dist/
*.spec

# python-uv.lock
# just like Pipfile.lock,
uv.lock

# poetry
poetry.lock

# Custom files
.cookies.txt
cookies.txt
.config.ini
config.ini
chaoxing.log
config*.ini
.chaoxing.log
./config.ini
./chaoxing.log
./cookies.txt
.idea/
cache.json
.vscode/
cache.json
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM python:3.10-slim

WORKDIR /app

COPY . /app

RUN pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

# 创建配置文件目录并提供默认配置
RUN mkdir -p /config && \
cp config_template.ini /config/config.ini

# 定义卷,用户可以挂载自己的配置文件
VOLUME /config

# 使用配置文件启动应用
ENTRYPOINT ["python3", "main.py", "-c", "/config/config.ini"]
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
学习通刷课脚本
17 changes: 17 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## 模块说明

- `__init__.py`: 提供格式化输出辅助函数
- `base.py`: 提供核心功能,包含主要的Chaoxing类和学习功能
- `answer.py`: 提供多种题库接口和答题功能
- `answer_check.py`: 答案检查和验证
- `cipher.py`: AES加密解密功能
- `config.py`: 全局配置常量
- `cookies.py`: Cookie管理
- `cxsecret_font.py`: 超星字体解析
- `decode.py`: 解析超星页面数据
- `exceptions.py`: 自定义异常类
- `font_decoder.py`: 字体解码器
- `logger.py`: 日志功能
- `notification.py`: 通知功能
- `process.py`: 进度显示工具
- `captcha.py`: 验证码识别模块
Loading