🚀 视频下载器,用于下载网站中可以在线播放的视频。
目录
支持的网站
站点 | URL | 普通画质 | VIP专属 |
---|---|---|---|
哔哩哔哩(单P/多P) | https://www.bilibili.com/ | ✓ | ✓ |
爱奇艺 | https://www.iqiyi.com/ | ✓ | ✓ |
腾讯视频 | https://v.qq.com/ | ✓ | ✓ |
芒果TV | https://www.mgtv.com/ | ✓ | ✓ |
WeTV | https://wetv.vip/ | ✓ | ✓ |
愛奇藝台灣站 | https://tw.iqiyi.com/ | ✓ | ✓ |
爱奇艺国际站 | https://www.iq.com/ | ✓ | ✓ |
此外,可选的 CommonHlsDownloader 脚本支持绝大部分基于 HLS 流式视频的网站,如 LPL官网 等。
功能特性
下载特性
- 跨平台支持(Windows/Linux/Mac)
- 多线程下载(单文件分段/多文件并行)
- 字幕下载和集成(集成字幕的视频需使用支持字幕的播放器播放,如
PotPlayer
,VLC Player
等)
关于VIP
本项目支持1080p蓝光画质、VIP专享、VIP点播、付费视频的下载,前提是你是VIP/用了券/付了费。
What you can watch determined what you can download.
你只能下载你或你的账号可以在线观看的视频,本项目没有VIP破解功能。
快速开始
安装
依赖程序
本项目基于Python、FFmpeg 和浏览器扩展 Violenmonkey/Tampermonkey 开发:
- Python (3.5 或以上)
- FFmpeg (Windows 系统无需安装,已内置到仓库中)
- Violenmonkey / Tampermonkey (二选一)
获取项目
直接下载压缩包视频下载器.zip,或使用 git clone:
git clone https://github.com/jaysonlong/webvideo-downloader.git
安装项目
浏览器安装 Violenmonkey/Tampermonkey 脚本。直接点击以下链接即可安装:
CommonHlsDownloader 脚本(可选。通用 HLS 下载脚本,作用于所有使用 HLS 的网站)
安装 python 依赖包:
cd webvideo-downloader/downloader
pip install -r requirements.txt
(可选)浏览器安装广告拦截器:
对于某些网站,视频存在广告时,浏览器插件脚本会延迟到广告即将结束时才能提取到视频链接,安装拦截器可不用等待广告播放完毕
运行
本项目分为两部分,Violentmonkey 目录下的 javascript 脚本用于在浏览器中提取视频链接,Downloader 目录下的 python 脚本用于下载、合并视频。
首先执行 python 脚本:
python daemon.py
然后访问视频网站并点击某个视频,网页会自动弹出下载按钮,点击按钮即可下载。
示例链接:https://www.bilibili.com/video/BV1c741157Wb
下载进度可在 python 脚本的命令窗口查看:
$ python daemon.py
Listening on port 18888 for clients...
Receive: {
"fileName": "看小黄书会被处罚吗",
"linksurl": "http://xxx",
"type": "link"
}
Handle: "看小黄书会被处罚吗"
匹配到1段音频,1段视频,开始下载
-- dispatcher/downloadDash
正在下载 E:\Workspace\Github\webvideo-downloader\temp\看小黄书会被处罚吗.audio.m4s
分8段, 并行8线程下载
进度: [########################################] 100% 0.9/0.9MB 450KB/s 0s
正在下载 E:\Workspace\Github\webvideo-downloader\temp\看小黄书会被处罚吗.video.m4s
分8段, 并行8线程下载
进度: [########################################] 100% 11.2/11.2MB 5.2MB/s 2s
正在合并视频
Finish.
python 脚本可选命令行参数:
$ python daemon.py -h
usage: daemon.py [-h] [-t:h N] [-t:f N] [-f N] [-p PORT] [-s] [-d] [-i]
optional arguments:
-h, --help show this help message and exit
-t:h N the thread count of hls download, default 8
-t:f N the thread count of fragments download, default 8
-f N the fragments count of each file, default 0 using the thread count
-p PORT the port that the backend server listens on, default 18888
-s if set, will save the temp files
-d debug mode, log more info and save the temp files (ignore -s)
-i interactive mode, get url and file name from the command line
github作者地址:https://github.com/jaysonlong/webvideo-downloader 内地访问速度较慢