异步下载udemy课程的简单脚本
async-udemy-dl的Python项目详细描述
udemy dl
目标
一个使用asyncio的python脚本,用于加速因中国gfw而无法在线观看视频的中国udemy用户的下载
此项目基于udemy-dl,并向其添加了异步支持。 python=3.7 请求 aiohttp 您可以通过克隆github存储库来下载最新版本的async udemy dl。 安装后,pip将在可执行路径中安装名为 此项目使用Cookie进行身份验证,因此必须在命令行中使用选项 下载课程 将课程下载到特定位置 从课程中下载特定章节
从章节中下载特定的讲座 下载特定章节的讲座
课程的下载章节范围 从章节范围下载特定讲座 从章节范围下载讲座范围 通过浏览器登录到你的udemy帐户。 登录后,右键单击页面上名为inspect element的搜索选项并单击该选项。 在该选项卡下查找network选项卡,然后单击该选项卡。在network选项卡下单击请求类型xhr。 现在单击udemy导航栏中的my courses并刷新页面,您将在network选项卡下看到一些请求。 右键单击指向udemy.com/api-2.0/的请求链接。只需复制请求头并保存到文本文件。 以上指南适用于firefox用户。chrome用户可以跟随guide by @lamlephamngoc。 完成对该文本文件运行异步udemy dl之后,它将开始下载课程。谢谢
功能
-c / --chapter
)。-l / --lecture
)。--chapter-start, --chapter-end
)下载章节。--lecture-start, --lecture-end
)下载讲座。-o / --output
)。要求
下载异步udemy dl
git clone https://github.com/Firkraag/async-udemy-dl
pip安装
pip install async-udemy-dl
async-udemy-dl
的脚本,因此async-udemy-dl
可以替换usage部分中的python async-udemy-dl.py
。用法
-k cookies_file
指定Cookie文件。
在使用此脚本之前,请按照Extracting Cookies / Request Headers将udemy cookies保存到文件。python async-udemy-dl.py -k COOKIES_FILE COURSE_URL
python async-udemy-dl.py -k COOKIES_FILE COURSE_URL -o "/path/to/directory/"
python async-udemy-dl.py -k COOKIES_FILE COURSE_URL -c NUMBER
python async-udemy-dl.py -k COOKIES_FILE COURSE_URL -c NUMBER -l NUMBER
python async-udemy-dl.py COURSE_URL -k COOKIES_FILE -c NUMBER --lecture-start NUMBER --lecture-end NUMBER
python async-udemy-dl.py COURSE_URL -k COOKIES_FILE --chapter-start NUMBER --chapter-end NUMBER
python async-udemy-dl.py COURSE_URL -k COOKIES_FILE --chapter-start NUMBER --chapter-end NUMBER --lecture NUMBER
python async-udemy-dl.py COURSE_URL -k COOKIES_FILE --chapter-start NUMBER --chapter-end NUMBER --lecture-start NUMBER --lecture-end NUMBER
提取cookies/请求头
高级用法
Author: Firkraag (Firkraag)
usage: async-udemy-dl.py [-h] [-v] -k cookie_file [-d] [-o] [-c] [-l]
[--chapter-start] [--chapter-end] [--lecture-start]
[--lecture-end] course
A cross-platform python based utility to download courses from udemy for
personal offline use.
positional arguments:
course Udemy course.
General:
-h, --help Shows the help.
-v, --version Shows the version.
Authentication:
-k , --cookies cookies_file Cookies to authenticate with.
Advance:
-d, --debug output debug info to screen
-o , --output Download to specific directory, if not specified, download to current directory.
-c , --chapter Download specific chapter from course.
-l , --lecture Download specific lecture from chapter(s).
--chapter-start Download from specific position within course.
--chapter-end Download till specific position within course.
--lecture-start Download from specific position within chapter(s).
--lecture-end Download till specific position within chapter(s).
Example:
python async-udemy-dl.py COURSE_URL -k cookies.txt
推荐PyPI第三方库