-
Notifications
You must be signed in to change notification settings - Fork 1
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
Foair
committed
May 25, 2018
0 parents
commit 4b5a996
Showing
30 changed files
with
568 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
mooc.xoy.io |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# 简介 | ||
|
||
## Course Crawler | ||
|
||
?> 部分功能在程序中尚未实现,在本文档中写出只起占位的作用,以后会逐步实现。 | ||
|
||
一个基于 Python 3 的 MOOC 课程内容获取工具,方便离线观看。 | ||
|
||
支持 [中国大学MOOC](https://www.icourse163.org/)、[学堂在线](http://www.xuetangx.com/)、[网易云课堂 MOOC 课程](http://mooc.study.163.com/)、~~[好大学在线](http://www.cnmooc.org/)~~、~~[爱课程](http://www.icourses.cn/)~~。 | ||
|
||
结构齐全、命名规范,可以很方便定位和查找。 | ||
|
||
 | ||
|
||
[下载最新程序](https://github.com/Foair/course-crawler/archive/master.zip) 或 [前往 GitHub](https://github.com/Foair/course-crawler) | ||
|
||
## 中文 MOOC 平台 | ||
|
||
**中国大学MOOC** 是国内优质的中文 MOOC 学习平台,由爱课程网携手·网易云课堂·打造。大多数的名校都有一定数量课程,如北京大学、浙江大学、哈尔滨工业大学等。 | ||
|
||
**学堂在线** 是清华大学发起的精品中文慕课平台。主要是 **清华大学** 的课程。 | ||
|
||
**好大学在线** 是上海交通大学拥有的中国顶尖慕课平台。主要是 **上海交通大学** 的课程。 | ||
|
||
**网易云课堂 MOOC 课程** 主要是 [顶尖中文大学计算机专业课程体系](http://study.163.com/curricula/cs.htm) 和 [深度学习工程师微专业](http://mooc.study.163.com/smartSpec/detail/1001319001.htm) 等课程。 | ||
|
||
**爱课程** 网的资源多,但总体比较陈旧。 | ||
|
||
 |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
* [简介](/) | ||
* [快速开始](quick-start.md) | ||
* [视频速览(演示)](video-tutorial.md) | ||
* 具体操作 | ||
* [中国大学MOOC](specific/icourse163.md) | ||
* [学堂在线](specific/xuetangx.md) | ||
* [好大学在线](specific/cnmooc.md) | ||
* [爱课程](specific/icourses.md) | ||
* [网易云课堂 MOOC 课程](specific/study-163-mooc.md) | ||
|
||
* [深入了解](basic.md) | ||
* 进阶使用 | ||
* [命令行参数](advance/cli.md) | ||
* [修改默认值](advance/patch.md) | ||
|
||
* [FAQ](faq.md) | ||
* [反馈和建议](feedback.md) | ||
* [已知问题](known-issues.md) | ||
* [一些技巧/建议](knack.md) | ||
* [未来可能的计划](future-plan.md) | ||
* [告示板](notice.md) |
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# 命令行参数 | ||
|
||
## 显示帮助信息 | ||
|
||
> `-h` `--help` 用于显示帮助信息。 | ||
输入 `python mooc.py -h` 或 `python mooc.py --help`。 | ||
|
||
## 指定下载目录 | ||
|
||
> `-d <path>` 用于指定下载目录为 `<path>`。 | ||
课程文件夹将在创建在 `<path>` 中。默认创建在当前目录,即 `-d ""`。 | ||
|
||
示例 | ||
|
||
```cmd | ||
python mooc.py https://www.icourse163.org/course/TONGJI-53004 -d "G:\MOOCs" | ||
``` | ||
|
||
!> `<path>` 不能以 `\` 结尾;当 `<path>` 存在空格的时候,必须使用 `"` 将路径包裹起来。 | ||
|
||
## 不下载 PDF | ||
|
||
> `--no-pdf` 用于阻止下载 PDF 文档。 | ||
默认会下载所有 PDF 课件。 | ||
|
||
|
||
当指定了这个选项之后,不会下载任何 PDF 文件(包括 PPT 和书籍等)。 | ||
|
||
示例 | ||
|
||
```cmd | ||
python mooc.py https://www.icourse163.org/course/TONGJI-53004 --no-pdf | ||
``` | ||
|
||
?> 指定这个选项,仅仅是不下载 PDF 格式的文件,千万不要认为有 Word 或 PowerPoint 文档可以下载。 | ||
|
||
|
||
## 修正视频/文档名 | ||
|
||
!> 未完成。 | ||
|
||
> `-i` 用于修改文件名。 | ||
会调出文件编辑器,编辑好视频的名字之后保存。默认没有启用。 | ||
|
||
## 不下载字幕 | ||
|
||
!> 未完成。 | ||
|
||
> `--no-sub` 用于阻止下载字幕。 | ||
## 不下载富文本 | ||
|
||
!> 未完成。 | ||
|
||
> `--no-text` 用于阻止下载富文本。 | ||
## 不下载附件 | ||
|
||
!> 未完成。 | ||
|
||
> `--no-file` 用于阻止下载附件。 |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 修改默认值 | ||
|
||
## 修改默认获取目录 | ||
|
||
如果不想每次都指定获取目录的话,可以修改 `mooc.py`,找到如下行: | ||
|
||
```python | ||
parser.add_argument('-d', default=r'G:\MOOCs', help='下载目录') | ||
``` | ||
|
||
将 `G:\MOOCs` 替换为想要的文件夹即可。 | ||
|
||
## 默认启用某个选项 | ||
|
||
修改 `mooc.py`,将选项所在 `store_false` 或 `store_true` 切换一下就行了。 | ||
|
||
示例 | ||
|
||
如果我想默认不下载 PDF,那么将 `--no-pdf` 所在的那一行的 `store_false` 改了就行了,改成这样 | ||
|
||
```python | ||
parser.add_argument('--no-pdf', action='store_true', help='不下载 PDF 文档') | ||
``` | ||
|
||
这样默认就不会下载 PDF,而如果在命令中使用了 `--no-pdf` 就会下载 PDF 了。 |
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 |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# 深入了解 | ||
|
||
## 各个模块 | ||
|
||
- `mooc.py`:主程序 | ||
- `icourse.py`:中国大学MOOC·模块 | ||
- `study.py`:网易云课堂 MOOC 模块 | ||
- `xuetangx.py`:学堂在线·模块 | ||
|
||
## 课程目录结构 | ||
|
||
课程的目录可能有如下文件或目录 | ||
|
||
```text | ||
<cousre> | ||
|-- Outline.txt | ||
|-- Playlist.dpl | ||
|-- Files/ | ||
|-- PDFs/ | ||
|-- Texts/ | ||
`-- Videos/ | ||
|-- Rename.bat | ||
`-- Videos.txt | ||
``` | ||
|
||
### 课程大纲/目录 | ||
|
||
`Outline.txt` 是课程的大纲,它的内容类似 | ||
|
||
```text | ||
6.1 空间直角坐标系及向量 {1} | ||
6.1.1 空间直角坐标系的基本概念 {1.1} | ||
6.1.1 空间直角坐标系的基本概念(视频) {1.1.1}# | ||
6.1.1 空间直角坐标系的基本概念(PPT) {1.1.1}+ | ||
6.1.1 空间直角坐标系的基本概念(PPT) 空间直角坐标系的基本概念.rar {1.1.1}! | ||
... | ||
``` | ||
|
||
每个级别依次增加 2 个空格的缩进,`{}` 之间的是程序生成的编号,用来唯一标识一个资源(比如视频、富文本等等)。 | ||
|
||
`{1.1.1}` 说明该视频文件以 `1.1.1` 开头,可以在 `Videos/` 中找到。如此可以方便地找到视频。 | ||
|
||
有些后面可能有奇怪的符号,比如 `{1.1.1}+` 的后面有个 `+`。下面是符号的说明: | ||
|
||
- `#`:视频,可以下载到 `Videos/` | ||
- `*`:课件,一般是 PDF 文件,位于 `PDFs/` | ||
- `+`:富文本,一般是 HTML 文件,位于 `Texts/` | ||
- `!`:附件,位于 `Files/` | ||
- `&`:字幕,位于 `Videos/` | ||
|
||
### 视频地址 | ||
|
||
`Videos.txt` 是视频的链接,它的内容类似 | ||
|
||
```text | ||
http://v.stu.126.net/mooc-video/nos/mp4/2017/02/21/1005820377_aa6e1b0d92314cdfaf6dcad3351b3533_shd.mp4?ak=99ed7479ee303d1b1361b0ee5a4abcee11069a7277fd2bfbd983de77f6586b3ab4d3781458cdbd61bf0041fae59dee85cb91769ba5850a28845217d0bc9bfb580015e48ffc49c659b128bfe612dda086d65894b8ef217f1626539e3c9eb40879c29b730d22bdcadb1b4f67996129275fa4c38c6336120510aea1ae1790819de86e0fa3e09eeabea1b068b3d9b9b6597acf0c219eb000a69c12ce9d568813365b3e099fcdb77c69ca7cd6141d92c122af | ||
http://v.stu.126.net/mooc-video/nos/mp4/2017/02/21/1005822368_a91783c5f05a49e29960d24f1dc06f15_shd.mp4?ak=99ed7479ee303d1b1361b0ee5a4abcee11069a7277fd2bfbd983de77f6586b3a33090c48273cc5e338f1d269a2b016013857294759d07b499e26c45d788128b30015e48ffc49c659b128bfe612dda086d65894b8ef217f1626539e3c9eb40879c29b730d22bdcadb1b4f67996129275fa4c38c6336120510aea1ae1790819de86e0fa3e09eeabea1b068b3d9b9b6597acf0c219eb000a69c12ce9d568813365b3e099fcdb77c69ca7cd6141d92c122af | ||
... | ||
``` | ||
|
||
复制到下载工具下载,比如 [aria2](https://github.com/aria2/aria2/releases)、[迅雷](http://dl.xunlei.com/) 等,也可以直接在浏览器中打开。 | ||
|
||
!> 建议下载到 `Videos/` 中,可以使用 `Rename.bat` 进行重命名,有字幕也会自动加载,也方便管理。 | ||
|
||
### 视频文件名 | ||
|
||
`Rename.bat` 用于将视频重命名,它的内容类似 | ||
|
||
```text | ||
CHCP 65001 | ||
REN "1005820377_aa6e1b0d92314cdfaf6dcad3351b3533_shd.mp4" "1.1.1 空间直角坐标系的基本概念(视频).mp4" | ||
REN "1005822368_a91783c5f05a49e29960d24f1dc06f15_shd.mp4" "1.2.1 向量的坐标表示(视频).mp4" | ||
REN "1005817378_500b5301360f49c18c6f8d3406959cf5_shd.mp4" "1.3.1 向量的模、方向余弦、投影(视频).mp4" | ||
REN "1005821395_ff485bb1e65145ec90bf04a259eb6b0e_shd.mp4" "2.1.1 向量的数量积(视频).mp4" | ||
REN "1005821396_9180e5908bc847548a8db625af9b1ad7_shd.mp4" "2.2.1 向量的数量积(续)(视频).mp4" | ||
REN "1005817386_18d7ede415ec4cb5befa71a9d790ce0f_shd.mp4" "2.3.1 向量的向量积(视频).mp4" | ||
REN "1005822373_8bf3846066e045cda306bd7d27e38786_shd.mp4" "2.4.1 向量的向量积(续)(视频).mp4" | ||
REN "1005899086_7780acc4ac074ed89b6301e41349a2c1_shd.mp4" "3.1.1 平面方程(视频).mp4" | ||
... | ||
``` | ||
|
||
下载下来的视频文件名是一团糟的,比如 | ||
|
||
```text | ||
1005820377_aa6e1b0d92314cdfaf6dcad3351b3533_shd.mp4 | ||
``` | ||
|
||
当视频和这个文件在同一个文件夹的时候,双击该文件,视频的文件名就清晰整齐了,也会按照章节次序排列。 | ||
|
||
### 播放列表 | ||
|
||
打开 `Playlist.dpl` 即可播放 `Vidoes/` 中的视频。 | ||
|
||
?> 由于文件系统的限制,特殊字符比如 `"` `/` `\` 都不允许出现在文件名中,所以文件名中的特殊字符是被删除的。假如原视频的标题是「有 3/4 的概率会下雨」,就会变成 `有 34 的概率会下雨`,就很奇怪吧。而播放的列表就可以解决这个问题,在播放列表中会显示 `有 3/4 的概率会下雨`。 | ||
|
||
### 说明 | ||
|
||
学堂在线暂时只有 `Books`,没有 `PDFs`,因为如果提供 PPT 的话,在讲义那一栏就有链接可以下载。 |
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# FAQ | ||
|
||
> 我的登录信息输错了(失效了),怎么重新填写? | ||
登录信息是保存在文件里的,不同的 MOOC 网站对应的文件不同,只要删除对应的文件就会要求重新输入。 | ||
|
||
- 学堂在线 `cookies_xuetangx.json` | ||
- 网易云课堂 `cookies_mooc_study.json` | ||
|
||
> 我遇到了一个课程无法成功获取,最快捷的反馈方式是? | ||
提出一个 issue 或发送一封邮件(见 [反馈和建议](feedback.md)),无需客套话,我会尽快处理的。 | ||
|
||
> 我想看旧版文档。 | ||
请前往 https://a.mooc.xoy.io/ 查看。 |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# 反馈和建议 | ||
|
||
只在 Windows 10 和 Ubuntu 经过简单测试,bug 和缺陷比较多。欢迎提交 issue 和发起 pull requests。 | ||
|
||
?> 由于只是一个简单的程序,并没有在程序健壮性方面做过多考虑。也不打算花更多时间去提高稳定性,只保证可以正常使用。 | ||
|
||
如果遇到有中途发生异常的课程,可以将课程的地址发到我的邮箱,我会尽快修复。 | ||
|
||
如果有任何好的建议也可以通过邮件和我联系。 | ||
|
||
电子邮件地址:[[email protected]](mailto:[email protected]) |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# 未来可能的计划 | ||
|
||
## 待办 | ||
|
||
- 直接将下载地址送入 aria2 | ||
- 生成播放列表 ✅ | ||
- 检查视频完整性 | ||
- 可以二次修改文件名 🎉[进行中] | ||
- 学堂在线·使用 app 中的接口 ⏲[2018 夏] | ||
- WebUI 用户界面 | ||
- 更加先进和全面的管理系统 | ||
- 好大学在线·慕课 🚩[优先] | ||
- 完整的视频教程 🚩[优先] | ||
- 更加详细和清晰的文档 ✅ | ||
- 对非 Python 的使用者更加友好的操作 🚩[优先] | ||
- 增加视频清晰度选择 | ||
- 课程增量更新 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Course Crawler</title> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | ||
<meta name="description" content="Description"> | ||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | ||
<link rel="stylesheet" href="vue.css"> | ||
</head> | ||
<body> | ||
<nav> | ||
<a href="https://aa">GitHub</a> | ||
</nav> | ||
<div id="app"></div> | ||
<script> | ||
window.$docsify = { | ||
loadSidebar: true, | ||
coverpage: false, | ||
name: '', | ||
repo: '' | ||
} | ||
</script> | ||
<script src="docsify.min.js"></script> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# 一些技巧/建议 | ||
|
||
## 简写 | ||
|
||
Windows 中如果将 `.py` 文件关联到了 Python Launcher,那么可以省略命令的 `python` 和 `.py`。 | ||
|
||
甚至还可以放到用户(系统)环境变量中,随时随地调用。 | ||
|
||
示例 | ||
|
||
```cmd | ||
mooc https://www.icourse163.org/course/TONGJI-53004 | ||
``` | ||
|
||
## 使用 PotPlayer | ||
|
||
本程序生成了 PotPlayer 的播放列表,可以直接使用 `.dpl` 文件播放视频获得更好的体验。 | ||
|
||
PotPlayer 可以实现视频任意倍速加速播放(如果 2 倍速还嫌不够的话),设置很多,几乎可以满足任何播放需求(除了画质)。 | ||
|
||
?> 不直接播放视频的原因是,尽管文件名是规范的,有时播放器就是会漏掉几个视频。(是真的少看一集。) | ||
|
||
## 不时看一下课程公告 | ||
|
||
有时会提供一些有用的资源。 | ||
|
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 已知问题 | ||
|
||
> 可能会出现被远程主机强制关闭一个连接。 | ||
解决方法:等待一段时间然后重新尝试。 | ||
|
||
> 网易云课堂·的 cookies 很容易失效。 | ||
解决方法:更加频繁地修改 cookies。 |
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 告示板 | ||
|
||
## Course Cralwer | ||
|
||
仅限个人学习和研究使用,切勿用于其他用途。强烈建议到 MOOC 网站进行学习,本程序只是提供一个备选方案。 | ||
|
||
本程序主体功能只是下载课件和附件,无任何手段获得付费课程,也没有以任何方式向任何人收取费用。 | ||
|
||
如果将程序用于商业用途或其他非法用途,一切后果由用户自负。 | ||
|
||
如果您发现有侵犯到您的合法权益,请与我联系删除相关程序,同时我对无意冒犯到您致以深深的歉意。 | ||
|
||
许可协议:MIT | ||
|
||
## 本文档 | ||
|
||
许可协议:CC0 | ||
|
||
## 感谢 | ||
|
||
docsify https://github.com/QingWei-Li/docsify/ | ||
|
||
以及你们的支持。 |
Oops, something went wrong.