Coder Social home page Coder Social logo

cocolight / mooc-dl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from siguremo/mooc-dl

0.0 1.0 0.0 171 KB

:man_student: [停止维护] **大学MOOC全课件(视频、文档、附件)下载器

License: GNU General Public License v3.0

Python 100.00%

mooc-dl's Introduction

mooc-dl

python 3.6.7

本程序提供**大学 MOOC 课件的下载,方便离线观看与复习,但本程序及其所得内容不可用于商业用途

Usage

在运行之前请确保安装 Python3.5 及以上版本,并安装依赖

pip install -r requirements.txt

之后在 config.json 中对一些参数进行配置就可以使用啦(登录只支持爱课程账号,因为其他的做起来太复杂,如果嫌注册太麻烦,直接使用这里放的共享账号就好)

{
  "username": <icourse_user_name>,        // 你的爱课程账号
  "password": <icourse_password>,         // 你的爱课程账号密码
  "resolution": 0,                        // 清晰度等级,可选 0,1,2 清晰度递减
  "root": "",                             // 下载目标根目录
  "num_thread": 30,                       // 下载线程数
  "overwrite": false,                     // 强制覆盖已有文件
  "file_path_template": "{base_dir}{sep}{cnt_1} {chapter_name}{sep}{cnt_2} {lesson_name}{sep}{cnt_3} {unit_name}",
                                          // 文件存储路径模板,可据此自定义文件存储路径
  "file_types": [1, 3, 4]                 // 下载文件类型,可选 1,3,4,分别代表视频、PDF、附件,默认全部下载
}

下载时,只需要以网址作为参数传入即可

python mooc-dl.py https://www.icourse163.org/course/ZJU-93001?tid=1003997005

Tips

关于文件路径

默认的文件路径是分级的,如果你不喜欢这样的效果,完全可以修改模板进行自定义,比如类似 course-crawler 那种分类式,你只需要将模版设置成这样即可

{
   "file_path_template": "{base_dir}{sep}{type}{sep}{cnt_3} {unit_name}"
}

进度条的问题

暂时进度条体验非常不佳,但不影响下载功能

License

本 Repo 采用 GPL-3.0 协议开源,请遵守该开源协议使用本项目,本项目源程序及所得内容均不可用于商业用途

mooc-dl's People

Contributors

dependabot-preview[bot] avatar siguremo avatar zpcc avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.