这里使用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:\Users\HHX>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文档地址
网站
URL
视频?
图像?
音频?
YouTube
✓
✓
✓
VK
✓
Vine
✓
Vimeo
✓
Vidto
✓
Veoh
✓
Tumblr
✓
✓
✓
TED
✓
SoundCloud
✓
✓
MusicPlayOn
✓
MTV81
✓
Mixcloud
✓
Metacafe
✓
Magisto
✓
Khan Academy
✓
JPopsuki TV
✓
Internet Archive
✓
✓
✓
Heavy Music Archive
✓
Google+
✓
✓
Freesound
✓
Flickr
✓
✓
✓
eHow
✓
Dailymotion
✓
CBS
✓
Bandcamp
✓
AliveThai
✓
interest.me
✓
755
ナナゴーゴー
✓
✓
niconico
ニコニコ動画
✓
163
网易视频
网易云音乐
http://v.163.com/
http://music.163.com/
✓
✓
56网
✓
AcFun
✓
Baidu
百度贴吧
✓
✓
爆米花网
✓
bilibili
哔哩哔哩
✓
Dilidili
✓
豆瓣
✓
斗鱼
✓
凤凰视频
✓
风行网
✓
iQIYI
爱奇艺
✓
激动网
✓
酷6网
✓
酷狗音乐
✓
酷我音乐
✓
乐视网
✓
荔枝FM
✓
秒拍
✓
MioMio弹幕网
✓
痞客邦
✓
PPTV聚力
✓
齐鲁网
✓
QQ
腾讯视频
✓
阡陌视频
✓
Sina
新浪视频
微博秒拍视频
http://video.sina.com.cn/
http://video.weibo.com/
✓
Sohu
搜狐视频
✓
天天动听
✓
Tudou
土豆
✓
虾米
✓
阳光卫视
✓
音悦Tai
✓
Youku
优酷
✓
战旗TV
✓
央视网
✓
对于不在列表的网站,通用解析器将寻找并下载感兴趣之内容.
如果 you-get
出现问题,不要惊慌. (是的,问题一直存在!)
看看是不是在 https://github.com/soimort/you-get/wiki/Known-Bugs里面, 搜索 开放Issue. 如果没人报告,开个新issue, 加上详细的命令行输出.
手机扫一扫
移动阅读更方便
你可能感兴趣的文章