I'm Samuel Chen
An Economy graduate from the class of 2022 turned Product Manager✨
🎓 Graduated in: 2022
📚 Major: Economy
🛠 Skills: Python, Vue.js
超星学习通/超星尔雅/泛雅超星全自动无人值守完成任务点
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
Screenshots
插入程序出现BUG的截图
运行环境 (请完善以下信息):
无论设置多少倍速都显示1倍速
doWork.py的第48行
sophia@SophiadeMacBook-Pro fxxk_chaoxing-main % python best.py
File "best.py", line 55
SyntaxError: Non-ASCII character '\xe6' in file best.py on line 55, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
没绑定手机号,希望增加学校或cookie登陆
已star,谢谢
刷课时手机端能正常登陆吗
适用于win环境的exe建议使用PyInstaller
来生成独立的可执行exe文件,他会自动打包相关依赖,Release里塞了一整个py环境属实是有点吓人
学完一节课,就会说mp4任务全部完成
形容Bug的信息
读取下一页错误,IndexError
Screenshots
482028125章0页读取完毕,查看下一页
482028125章1页读取完毕,查看下一页
482028125章读取完毕,开始读取下一章
482028126章0页读取完毕,查看下一页
482028126章1页读取完毕,查看下一页
482028126章读取完毕,开始读取下一章
开始读取后续章节
482028127章0页读取完毕,查看下一页
Traceback (most recent call last):
File "D:\WorkSpace\for_shen\fxxk_chaoxing\main.py", line 16, in <module>
doWork.do_ppt(session, mp4, ppt, usernm, course)
File "D:\WorkSpace\for_shen\fxxk_chaoxing\src\course\doWork.py", line 211, in do_ppt
load_ppt(session, course, ppt_done, chapter_done, chapters, usernm, ppt)
File "D:\WorkSpace\for_shen\fxxk_chaoxing\src\course\doWork.py", line 258, in load_ppt
result = re.findall('mArg = (.*?);', resq)[1]
IndexError: list index out of range
运行环境 (请完善以下信息):
其他内容
形容Bug的信息
视频任务失败
查看后发现是调用上报进度接口出错
不知道会不会被系统查出来
还有就是我抓包后发现APP调用的接口和现在工具里的接口有些不一样
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
Screenshots
插入程序出现BUG的截图
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内容
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
[2022-03-25 21:19:55] [INFO] [file: main.py] [func: info] [line: 74] 共加载任务点31个
[2022-03-25 21:19:55] [INFO] [file: main.py] [func: info] [line: 74] 当前倍速 1 倍速
[2022-03-25 21:19:55] [INFO] [file: main.py] [func: info] [line: 74] 推荐使用 1 倍速,使用多倍速存在风险
[2022-03-25 21:19:55] [INFO] [file: main.py] [func: info] [line: 74] 开始任务 GMT20210914-232233_-SSTC--41092-Network-Fundamentals_1920x1080.mp4
[2022-03-25 21:19:56] [ERROR] [file: main.py] [func: error] [line: 80] 出现错误,错误类型:json.decoder.JSONDecodeError
Screenshots
插入程序出现BUG的截图
出现错误后程序自动关闭,只能截取报错前的一部分日志
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内容
这个功能建议是否与使用过程中出现的BUG有关
详细的描述
描述你想添加的功能
详细的描述
补充内容
可以上传截图或文字表达补充建议
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
Traceback (most recent call last):
File "K:\chaoxing-main\main.py", line 65, in
ft.init_all_path(["saves", "logs"]) # 检查文件夹
File "K:\chaoxing-main\utils\functions.py", line 56, in init_all_path
check_path(path, file=False)
File "K:\chaoxing-main\utils\functions.py", line 50, in check_path
mkdir(path)
PermissionError: [WinError 5] 拒绝访问。: 'saves'
[已退出进程,代码为 1]
Screenshots
插入程序出现BUG的截图
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内、容
已star,谢谢
我的这个课程一共大概有124个视频,但是程序里的任务点数量只有54,
形容Bug的信息
读取课程时抛出KeyError,导致程序终止
请输入要登录的用户序号,新建请输入直接点击回车键1
2022-04-05 15:48:54,182 - main - INFO - 开始登录
2022-04-05 15:48:56,444 - main - INFO - 开始读取所有课程
2022-04-05 15:49:00,559 - main - INFO - 开始选课
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196,
in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Users\帅帅民航小辰\.vscode\extensions\ms-python.python-2022.4.0\pythonFiles\lib\python\debugpy\__main__.py", line 45, in <module>
cli.main()
File "c:\Users\帅帅民航小辰\.vscode\extensions\ms-python.python-2022.4.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 444, in main
run()
File "c:\Users\帅帅民航小辰\.vscode\extensions\ms-python.python-2022.4.0\pythonFiles\lib\python\debugpy/..\debugpy\server\cli.py", line 285, in run_file
runpy.run_path(target_as_str, run_name=compat.force_str("__main__"))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 269,
in run_path
return _run_module_code(code, init_globals, run_name,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 96, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1264.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "c:\Users\帅帅民航小辰\Desktop\chaoxing-main\main.py", line 77, in <module>
if chaoxing.select_course(): # 选择要学习的课程
File "c:\Users\帅帅民航小辰\Desktop\chaoxing-main\api\chaoxing.py", line 82, in select_course
pretty_print(self.courses)
File "c:\Users\帅帅民航小辰\Desktop\chaoxing-main\utils\functions.py", line 155, in pretty_print
data.append([str(course_index + 1), str(course["key"]), str(course['content']['course']['data'][0]['name'])])
KeyError: 'course'
运行环境 (请完善以下信息):
其他内容
我检查部分代码,变量 Key:course 并没有 课程名称(瞎猜)
预测是学习通更新导致 (也有可能是咱技术不够)
以下是我在Debug中查找的 变量 Key:course
{
'cfid': -1,
'catalogId': 1458887,
'cataid': '100000017',
'key': 1458887, '
content': {
'cfid': 1458887,
'uid': '170930724',
'createtime': 1621939782000,
'puid': '170930724', 'pid': 0,
'folderName': '弃修',
'cpi': 181112899,
'shareType': 10
}
}
如题。
出现报错<class 'KeyError'>
错误文件名:C:\Users\user\Downloads\chaoxing-2.3.2\main.py
错误行数:86
错误原因:'jobid'
请截图提交至Github或Telegram供作者修改代码
点击回车键退出程序
形容Bug的信息
开始做以视频形式的结点任务,main.py开始报错并停止运行
Screenshots
错误代码
Traceback (most recent call last):
File "C:\Users\帅帅民航小辰\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.752.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\帅帅民航小辰\Desktop\chaoxing-main\main.py", line 515, in do_mp4
resp.json()
File "C:\Users\帅帅民航小辰\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\requests\models.py", line 917, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: [Errno Expecting value] <!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width">
<title>403</title>
<style>
.main{height:255px;margin:0 auto;margin-top:15%;font-size:14px;color:#999; width: 350px;}
.font_top{padding-top:45px;display:inline;}
</style>
</head>
<body>
<div class="main">
<p class="font_top">>_< 很抱歉,您没有权限访问这个页面! (403)</p>
<p style="font-size: 12px; color: #ddd;">58.216.213.56<br/>mooc-3390871073-hgmpc</p>
</div>
</body>
</html>
: 0
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\帅帅民航小辰\Desktop\chaoxing-main\main.py", line 639, in <module>
course.do_mp4(session, speed)
File "C:\Users\帅帅民航小辰\Desktop\chaoxing-main\main.py", line 518, in do_mp4
raise Exception("视频任务失败")
Exception: 视频任务失败
运行环境 (请完善以下信息):
其他内容
根据TrackBack推测应该是超星更新了读取视频的API,导致本程序无法正确读取视频进而报错(最近很多脚本或程序都有类似这样的Bug)
作者你好,目前此项目使用起来非常流畅,只是有个小建议
因为现在程序是交互式配置登录和选课刷课的,建议能够在运行时能提供命令剔除输入,具体可以这样设计
python main.py guess
# 自动加载账号及选课配置(禁用交互配置,只输出、不再要求用户输入),自动开始刷课
# 这样用户在第一次交互配置完后,就可以退出,第二次使用这个命令自动运行
这样之后就可以通过脚本实现后台运行了
python main.py guess > /tmp/chaoxing.log 2>&1
@xz454867105
~/chaoxing-main ❯ pip install -r requirements.txt
Requirement already satisfied: requests>=2.24.0 in /home/text/.local/lib/python2.7/site-packages (from -r requirements.txt (line 1)) (2.27.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/text/.local/lib/python2.7/site-packages (from requests>=2.24.0->-r requirements.txt (line 1)) (1.26.8)
Requirement already satisfied: certifi>=2017.4.17 in /home/text/.local/lib/python2.7/site-packages (from requests>=2.24.0->-r requirements.txt (line 1)) (2021.10.8) Requirement already satisfied: idna<3,>=2.5; python_version < "3" in /home/text/.local/lib/python2.7/site-packages (from requests>=2.24.0->-r requirements.txt (line 1)) (2.10)
Requirement already satisfied: chardet<5,>=3.0.2; python_version < "3" in /home/text/.local/lib/python2.7/site-packages (from requests>=2.24.0->-r requirements.txt (line 1)) (4.0.0)
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
Screenshots
插入程序出现BUG的截图
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内容
我的一门课程任务点(全部是视频)有143个,但程序加载出的任务点只有前92个,之后的加载不出来。
另一门课程的视频任务点有189个,但程序加载出的任务点只有前120个,之后的加载不出来。
重复尝试多次,发现每次都是能加载的任务点数量固定不变。
sophia@SophiadeMacBook-Pro fxxk_chaoxing-main % python best.py
File "best.py", line 516
print(content, end='\r', flush=True)
^
SyntaxError: invalid syntax
作者您好,如果是一个新手玩家第一次运行这个python脚本可能会报错,需要运行 python -m pip install requests
这行命令才能运行程序,如果是个老手已经弄了其他的脚本没有这个问题,因为已经安装了
在本地win10上能正常运行代码,但是在阿里云(ubuntu20.04)上运行,输入账号登录会报错。
错误详情:
Traceback (most recent call last):
File "main.py", line 11, in
usernm, session = getUser.get_session()
File "/home/hjk/chaoxing-main/src/user/getUser.py", line 181, in get_session
session = newLogin(usernm, passwd)
File "/home/hjk/chaoxing-main/src/user/getUser.py", line 108, in newLogin
if resp.json()['status']:
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
运行环境是Python3.8.10, 阿里云Ubuntu20.04
清晰有逻辑的提出问题
详细内容
作者你好,我将您的代码集成于APP内,并且注明python来自于您,想要开源到github,不知是否可以
data以后有问题,可能超星网站升级了,建议作者更新一下。
本程序是基于作者最初上课内容的任务点开发完成。在发布这一段时间后,作者发现还有一些任务点这个程序识别不了(根据实际课程情况,本程序现阶段大概能完成70%-90%的任务点)。受限于作者没有具有这些任务点的课程,且空余时间不允许不断更新。假如您有能力帮助这个程序的开发。可以把您的抓包结果分析后以issue或pr的形式提交给我。
pr允许修改内容:
一、src/course/foreWork.py的job_type函数(用于将超星api返回的json格式内容拆分分析保存,您可以修改该函数,实现识别您的课程任务点)
二、src/course/doWork.py新建一个以do_XXX命名的函数,如(do_mp4,do_ppt等),实现发送完成任务点请求的功能,详情参考do_mp4函数
修改完成后可以提交pull&requests请求,我在检查后会merge进dev分支,并将您加入CONTRIBUTOR贡献者名单。
作者你好,请问这个程序单次打开只能刷一科吗,能不能添加一次刷多科,自动刷下一科得功能
形容Bug的信息
Traceback (most recent call last):
File "/root/chaoxing-main/src/course/foreWork.py", line 261, in get_openc
course['openc'] = re.findall("openc : '(.*?)'", resp.text)[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 20, in
session, jobs, course, mp4, ppt = foreWork.get_forework_done(usernm, session,courseid)
File "/root/chaoxing-main/src/course/foreWork.py", line 283, in get_forework_done
session, course = get_openc(usernm, course, session)
File "/root/chaoxing-main/src/course/foreWork.py", line 263, in get_openc
course['openc'] = re.findall('&openc=(.*?)"', resp.text)[0]
IndexError: list index out of range
运行环境 (请完善以下信息):
其他内容
拉取了最新版本仍然无法运行
IndexError: list index out of range
哥哥,我实在不会搞这个代码,能更新一下exe文件吗?
在本地跑的没问题,挂服务器上一直报 json.decoder.JSONDecodeError
看了下代码,发现是登陆的时候报403了,希望可以加个提示啥的
定位位置:src/user/getUser.py, line 68, in login result = resp.json()
有些问题想咨询一下,有Vx或者TG,skype都可以。
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
foreWork.py:142 foreWork.py:141
Screenshots
插入程序出现BUG的截图
课程后边的视频没有刷
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内容
形容Bug的信息
[root@VM-4-4-centos chaoxing]# python3 main.py -c
[20:03:02] 启动方式:配置文件启动 config.py:47
[20:03:02] 正在开始尝试登录账号 getUser.py:93
登录成功 getUser.py:108
正在本地保存账户信息 getUser.py:115
账户信息保存成功 getUser.py:118
[20:03:02] 开始获取用户的所有课程信息 foreWork.py:23
Traceback (most recent call last):
File "main.py", line 20, in
session, jobs, course, mp4, ppt = foreWork.get_forework_done(usernm, session,courseid)
File "/root/chaoxing/src/course/foreWork.py", line 277, in get_forework_done
session, chapterids, course, isLocal = find_courses(usernm, session,courseid)
File "/root/chaoxing/src/course/foreWork.py", line 68, in find_courses
if str(item['content']['course']['data'][0]['id']) == str(courseid):
KeyError: 'course'
其他内容
通过配置文件启动时报错
形容Bug的信息
清楚准确的描述Bug出现的代码行数,以及上下文的日志内容
当前视频:xxxx,xxxx——xxxxxxxxxxx
当前任务: xxxx,xxxx——xxxxxxxxxxx 已完成
当前视频:xxxx,xxxx——xxxxxxxxxxx
当前任务: xxxx,xxxx——xxxxxxxxxxxx 已完成
Traceback (most recent call last):
File "main.py", line 106, in
File "main.py", line 32, in do_work
KeyError: 'name'
[5608] Failed to execute script 'main' due to unhandled exception!
[已退出进程,代码为 1]
Screenshots
插入程序出现BUG的截图
运行环境 (请完善以下信息):
其他内容
您觉得对问题反馈有帮助的内、容
在本地能正常运行代码,
但是在阿里云服务器(ubuntu20.04)上运行,输入账号登录报错
Traceback (most recent call last):
File "main.py", line 11, in
usernm, session = getUser.get_session()
File "/home/hjk/chaoxing-main/src/user/getUser.py", line 181, in get_session
session = newLogin(usernm, passwd)
File "/home/hjk/chaoxing-main/src/user/getUser.py", line 108, in newLogin
if resp.json()['status']:
File "/usr/local/lib/python3.8/dist-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.8/json/init.py", line 357, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.8/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
运行环境是Python3.8.10,阿里云Ubuntu20.04
因为课程是一个视频后面跟着一个作业,如果不做作业章节就不会解锁,之前ZhyMC/chaoxing-xuexitong-autoflush的可以未解锁章节的情况下刷完视频,可惜现在不维护了。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.