Skip to content

Commit 2d031ab

Browse files
author
xirenbing
committed
Updata
1 parent 8c020e7 commit 2d031ab

File tree

5 files changed

+27
-20
lines changed

5 files changed

+27
-20
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
docker/*
22
img/*
33
版本包/*
44
test/*

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
# autochaoxing
22

33
无界面超星刷课脚本,通过selenium库+bs4库+正则处理,实现看视频+章节测试全自动,无需打开浏览器即可刷课(还支持多开哦:smile:
4-
5-
4+
<hr/><br/>
65

76
## 使用
87

98
- 安装chrome浏览器以及相对应的chromedriver,并**将chromedriver复制到source_code目录下**
109
- [chrome浏览器下载地址](https://www.google.cn/chrome/)[chromedriver下载地址](http://npm.taobao.org/mirrors/chromedriver/)或者[这里](http://chromedriver.storage.googleapis.com/index.html),注意版本对应
1110
- 安装python3和pip,[python官网](https://www.python.org)
12-
- 命令行执行`pip install selenium pillow requests beautifulsoup4 colorama`
11+
- 命令行执行`pip install -r requirements.txt`
1312
-**logindata_phone.txt****logindata.txt**中按提示填写登录信息,并把提示信息删除(推荐使用前者)
1413
- 查看帮助信息 `python autocx.py -h` 选择合适的参数开始刷课
1514

16-
- 如果有帮到你的话请赏颗:star:
15+
- [懒人通道](https://github.com/Luoofan/autochaoxing/releases):win10x64环境下可直接使用打包的exe
1716
- **Linux用户**可以配环境运行py,也可以使用**docker**:point_down:
17+
- 如果有帮到你的话请赏颗:star:
1818

19-
19+
<br/>
2020

2121
## 关于autocx(Docker)
2222

@@ -33,7 +33,7 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
3333

3434
详细信息请见[README_docker.md](https://github.com/Luoofan/autochaoxing/blob/master/docker/README_docker.md) 或者[移步项目地址](https://hub.docker.com/r/kimjungwha/autocx)
3535

36-
36+
<br/>
3737

3838
## 功能支持
3939

@@ -48,7 +48,7 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
4848
- [x] ***多开***
4949

5050

51-
51+
<br/>
5252

5353
## 暂不支持&ToDo
5454
- [ ] 非视频、章节测试的任务点
@@ -57,18 +57,18 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
5757
- [ ] ~~自动填写登录验证码~~(手机登录不需要填写)
5858
- [ ] ~~多账号多开~~(初步完成)
5959

60-
60+
<br/>
6161

6262
## 如果想亲手写刷课脚本 或者遇到问题 可以先来[FAQ](https://github.com/Luoofan/autochaoxing/blob/master/FAQ.md)看看哦:blush:
6363

64-
64+
<br/>
6565

6666
## 关于题库与考试
6767

6868
- 题库是直接访问的前辈维护的题库服务器;考试因为考虑到直接无界面完成会不放心,所以暂未提供支持,考试时可参考record.txt或者使用**查题程序**,当然你也可以来[这里get查题软件](https://github.com/yanyongyu/CXmoocSearchTool)或者直接使用以下的脚本
6969
- 题库服务器来源:[js脚本刷课项目](https://github.com/CodFrm/cxmooc-tools),[greasyfork](https://greasyfork.org/zh-CN/scripts/369625-%E8%B6%85%E6%98%9F%E7%BD%91%E8%AF%BE%E5%8A%A9%E6%89%8B),十分感谢!
7070

71-
71+
<br/>
7272

7373
## 更新
7474

@@ -80,7 +80,7 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
8080
- `fullauto`: 全自动模式——自动遍历全部课程,无需输入
8181
- `control`: 单课程控制模式——选择课程并选择控制章节,自动完成选定章节前的任务点
8282
- 新增**视频倍速**`-r(--rate)` 默认1倍速
83-
- $[0.625,16]$ 全局倍速设置——在选定模式的全局范围内开启该倍速
83+
- [0.625,16] 全局倍速设置——在选定模式的全局范围内开启该倍速
8484
- 代码简单**重构**,执行**优化**:将原有功能封装,想*亲自写脚本*的童鞋可以关注这点哦 :point_left:
8585
- 提高**容错率**(遇到未完成的任务点会暂时跳过,登录异常采用备用登录方案)
8686
- 更改原播放视频部分的模拟操作为js操作,提高程序运行稳定性
@@ -102,6 +102,7 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
102102
- 更改了登录和获取课程的模式,**减少了等待时间**,原来的模式保留作为备用方案
103103
- 修复了其他任务点影响视频任务点无法执行的bug,修复了部分视频无法获取的bug
104104
- 2020-3-16:
105+
105106
-[KimJungWha](https://github.com/KimJungWha)制作了**Docker版本**,并发布到了[DockerHub](https://hub.docker.com/r/kimjungwha/autocx)
106107
- 2020-3-15:
107108
- 增加了短时间内多次答题的时间限制,**减少答题验证码的弹出**
@@ -125,7 +126,7 @@ autocx是autochaoxing的**Docker**版本,主要由[KimJungWha](https://github.
125126
- 新增了查题程序,分命令行执行和窗口执行两种,配套刷课脚本用来考试查询
126127
- 发布了win10x64下的打包程序1.0,可直接运行exe开始刷课
127128

128-
129+
<br/>
129130

130131
## 写在最后
131132

requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
selenium
2+
pillow
3+
requests
4+
beautifulsoup4
5+
colorama

source_code/autocx.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Linux(docker)环境下:待定
77
# author Luoofan
88
# date 2020-03-27 20:38:15
9-
# FilePath\source_codes\autocx.py
9+
# FilePath\source_code\autocx.py
1010
#
1111
from subprocess import Popen
1212
from time import sleep
@@ -15,7 +15,7 @@
1515
from sys import argv
1616
from getopt import gnu_getopt
1717
from requests import post
18-
from platform import platform,architecture
18+
from platform import platform,architecture,system
1919

2020
class Color(object):
2121
END = Fore.RESET
@@ -37,6 +37,7 @@ def __init__(self):
3737
#print(self)
3838

3939
COLOR = Color()
40+
SYSTEM = 0 if system()=='Windows' else 0
4041

4142
def getlogindata():
4243
return open(r'./logindata.txt', 'r', encoding='utf-8').readlines()
@@ -50,7 +51,7 @@ def send_err(err_info):
5051
'arch': str(architecture()),
5152
'errorinfo': err_info
5253
}
53-
post('http://39.98.127.46/index.php', data=data)
54+
post('http://39.98.127.46/', data=data)
5455

5556
def perform(mode,rate):
5657
#处理账号信息

source_code/singlecourse.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# coding=utf-8
22
##
33
# brief 单账号下单课程任务类
4-
# author Luoofan
5-
# date 2020-03-15 15:40:43
6-
# FilePath\source_codes\singlecourse.py
7-
#
4+
# author Luoofan
5+
# date 2020-04-03 10:11:02
6+
# FilePath\source_code\singlecourse.py
7+
#
88
from selenium import webdriver
99
from selenium.webdriver.chrome.options import Options
1010
from selenium.webdriver.support.wait import WebDriverWait

0 commit comments

Comments
 (0)