YouGet 批量下载视频
- 安装python,安装很简单这里略过
- 安装you-get, 使用如下命令【最好使用管理员身份打开】
pip3 install you-get
安装完成后更新到最新使用
pip3 install --upgrade you-get
支持的网站
对于不在列表中的所有其他站点,可能会获取不到或者出去异常,感兴趣的自己研究一下
- you-get命令详解
- 获得下载资源的信息,使用
-i
参数,i
代表info资源信息
you-get -i 【资源地址,http/https】
,然后download-with命令下载对应的格式
C:\Users\qfmx>you-get -i https://www.bilibili.com/video/av97250005?spm_id_from=333.5.b_686967685f656e65726779.1
site: Bilibili
title: 最怕音乐学院的忽然认真,学生合唱《勇气》听得鸡皮疙瘩落一地
streams: # Available quality and codecs
[ DASH ] ____________________________________
- format: dash-flv
container: mp4
quality: 高清 1080P
size: 59.6 MiB (62495419 bytes)
# download-with: you-get --format=dash-flv [URL]
- format: dash-flv720
container: mp4
quality: 高清 720P
size: 41.5 MiB (43542786 bytes)
# download-with: you-get --format=dash-flv720 [URL]
- format: dash-flv480
container: mp4
quality: 清晰 480P
size: 23.6 MiB (24762548 bytes)
# download-with: you-get --format=dash-flv480 [URL]
- format: dash-flv360
container: mp4
quality: 流畅 360P
size: 12.7 MiB (13362509 bytes)
# download-with: you-get --format=dash-flv360 [URL]
[ DEFAULT ] _________________________________
- format: flv
container: flv
quality: 高清 1080P
size: 93.4 MiB (97904309 bytes)
# download-with: you-get --format=flv [URL]
- format: flv720
container: flv
quality: 高清 720P
size: 63.2 MiB (66310980 bytes)
# download-with: you-get --format=flv720 [URL]
- format: flv480
container: flv
quality: 清晰 480P
size: 28.3 MiB (29639529 bytes)
# download-with: you-get --format=flv480 [URL]
- format: flv360
container: flv
quality: 流畅 360P
size: 12.9 MiB (13519480 bytes)
# download-with: you-get --format=flv360 [URL]
设置下载文件保存的路径及文件名
# 1.先使用you-get -i 【资源地址】 # 设置路径方式一,然后再使用下载视频 cd /opt/down #直接切换Linux D: #切换到D盘 winAll cd D:\down # winAll # 设置自定义路径 you-get -o 路径地址【相对路径,绝对路径都可以】 【资源地址】 # 类如: # —————————————————————————————————————————————————————————————— C:\Users\qfmx>you-get -o D:\images https://www.bilibili.com/video/av97250005?spm_id_from=333.5.b_686967685f656e65726779.1 site: Bilibili title: 最怕音乐学院的忽然认真,学生合唱《勇气》听得鸡皮疙瘩落一地 stream: - format: flv container: flv quality: 高清 1080P size: 93.4 MiB (97904309 bytes) # download-with: you-get --format=flv [URL] Downloading 最怕音乐学院的忽然认真,学生合唱《勇气》听得鸡皮疙瘩落一地.flv ... 69.3% ( 64.8/ 93.4MB) ├████████████████████████████────────────┤[1/1] 774 kB/s # ————————————————————————————————————————————————————————— # 设置自定义路径及文件名 # ------------------------------------------- C:\Users\qfmx>you-get -o D:\images -O 自定义文件名【勇气】 --format=dash-flv https://www.bilibili.com/video/av97250005?spm_id_from=333.5.b_686967685f656e65726779.1 site: Bilibili title: 最怕音乐学院的忽然认真,学生合唱《勇气》听得鸡皮疙瘩落一地 stream: - format: dash-flv container: mp4 quality: 高清 1080P size: 59.6 MiB (62495419 bytes) # download-with: you-get --format=dash-flv [URL] Downloading 自定义文件名【勇气】.mp4 ... 100% ( 59.6/ 59.6MB) ├████████████████████████████████████████┤[2/2] 2 MB/s Downloading 最怕音乐学院的忽然认真,学生合唱《勇气》听得鸡皮疙瘩落一地.cmt.xml ——————————————————————————————————————————————————————————————————————
- mp4格式加参数后偶尔会视频和音频格式分离的情况,建议使用flv格式的
- -o 资源存放路径 -O 文件名【不要加后缀】,注意小写o后面加的是资源存放路径,大写的则是你自定义的文件名
- 批量下载B站的教程视频
贴上我需要下载的地址:https://www.bilibili.com/video/av71335007
批量下载命令:
you-get --playlist -o D:\docker教程 --format=flv https://www.bilibili.com/video/av71335007
ok.文章来源官网整理,感谢大家支持