这里使用you-get工具进行下载
github地址:https://github.com/soimort/you-get/
github项目文档:https://github.com/soimort/you-get/wiki/%E4%B8%AD%E6%96%87%E8%AF%B4%E6%98%8E#installation
1、安装python环境
访问 https://www.python.org/downloads/
点击下载 并安装即可
2、安装FFmpeg 环境
浏览器访问:https://ffmpeg.zeranoe.com/builds/
这个地址较慢,可以访问以下地址下载exe安装包
https://www.lanzous.com/i9s1hdi
下载完成后 打开cmd运行
ffmpeg -version
显示以下内容
ffmpeg version N-94813-g85386c36e3-ffmpeg-for-N_m3u8DL-CLI Copyright (c) 2000-2019 the FFmpeg developers built with gcc 8.2.0 (GCC) libavutil 56. 35.100 / 56. 35.100 libavcodec 58. 56.101 / 58. 56.101 libavformat 58. 32.104 / 58. 32.104 libavfilter 7. 58.102 / 7. 58.102 libavresample 4. 0. 0 / 4. 0. 0 libswresample 3. 6.100 / 3. 6.100
即为安装成功
3、安装you-get 工具
快捷键win+R ,输入cmd ,
运行命令
pip3 install you-get
安装完成后显示
C:UsersHHX>pip3 install you-get Collecting you-get Downloading https://files.pythonhosted.org/packages/f5/7a/5199400077ac6ca7c9833e53532d3f75d265d8b3da67e555f0c4033ea003/you_get-0.4.1403-py3-none-any.whl (214kB) |████████████████████████████████| 215kB 2.9kB/s Installing collected packages: you-get Successfully installed you-get-0.4.1403 WARNING: You are using pip version 19.2.3, however version 20.0.2 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
运行命令
python -m pip install --upgrade pip
显示以下内容
Collecting pip Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB) |████████████████████████████████| 1.4MB 52kB/s Installing collected packages: pip Found existing installation: pip 19.2.3 Uninstalling pip-19.2.3: Successfully uninstalled pip-19.2.3
开始
下载视频
you-get 视频链接
也可以使用
you-get -i 视频链接
使用“-i”,可以先查看下载的画质选择,可以看到有不同的画质,
[ DASH ] ____________________________________ - format: dash-flv720 container: mp4 quality: 高清 720P size: 84.5 MiB (88620001 bytes) # download-with: you-get --format=dash-flv720 [URL] - format: dash-flv480 container: mp4 quality: 清晰 480P size: 76.0 MiB (79730773 bytes) # download-with: you-get --format=dash-flv480 [URL] - format: dash-flv360 container: mp4 quality: 流畅 360P size: 56.5 MiB (59276792 bytes) # download-with: you-get --format=dash-flv360 [URL] [ DEFAULT ] _________________________________ - format: flv720 container: flv quality: 高清 720P size: 112.9 MiB (118430668 bytes) # download-with: you-get --format=flv720 [URL] - format: flv480 container: flv quality: 清晰 480P size: 100.6 MiB (105497054 bytes) # download-with: you-get --format=flv480 [URL] - format: flv360 container: flv quality: 流畅 360P size: 66.6 MiB (69812960 bytes) # download-with: you-get --format=flv360 [URL]
接着可以根据 download-with 后面的命令对应下载不同画质的视频,把URL替换成视频链接即可
(注:文件默认下载在当前打开cmd的文件目录下)
更多命令使用可以查看GitHub文档地址
支持网站
对于不在列表的网站,通用解析器将寻找并下载感兴趣之内容.
已知问题
如果 you-get
出现问题,不要惊慌. (是的,问题一直存在!)
看看是不是在 https://github.com/soimort/you-get/wiki/Known-Bugs里面, 搜索 开放Issue. 如果没人报告,开个新issue, 加上详细的命令行输出.