You-get 是一个可以下载很多在线视频的使用的Python库,我最近主要利用这个库来下载bilibili的视频,下面做一些使用的简单记录。
基本使用
安装
和其他python库安装相同,直接使用pip即可。
1 2
| activate deep pip install you-get
|
使用
- 分析视频信息
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
| you-get -i url
you-get -i you-get -i https://www.bilibili.com/video/BV1ST4y1E7FW?from=search&seid=13389194302262225891 ''' 输出信息: site: Bilibili title: 【4k60帧】真正的奥利给,“后浪风”演讲——看见的力量 streams: # Available quality and codecs [ DASH ] ____________________________________ - format: dash-flv container: mp4 quality: 高清 1080P size: 46.7 MiB (48993131 bytes) # download-with: you-get --format=dash-flv [URL]
- format: dash-flv720 container: mp4 quality: 高清 720P size: 32.3 MiB (33909997 bytes) # download-with: you-get --format=dash-flv720 [URL]
- format: dash-flv480 container: mp4 quality: 清晰 480P size: 16.4 MiB (17216475 bytes) # download-with: you-get --format=dash-flv480 [URL]
- format: dash-flv360 container: mp4 quality: 流畅 360P size: 11.4 MiB (11943322 bytes) # download-with: you-get --format=dash-flv360 [URL]
[ DEFAULT ] _________________________________ - format: flv container: flv quality: 高清 1080P size: 75.9 MiB (79590049 bytes) # download-with: you-get --format=flv [URL]
- format: flv720 container: flv quality: 高清 720P size: 51.8 MiB (54269960 bytes) # download-with: you-get --format=flv720 [URL]
- format: flv480 container: flv quality: 清晰 480P size: 25.2 MiB (26397350 bytes) # download-with: you-get --format=flv480 [URL]
- format: flv360 container: flv quality: 流畅 360P size: 11.5 MiB (12080563 bytes) # download-with: you-get --format=flv360 [URL]
'seid' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
'''
|
- 下载视频
1 2 3 4 5 6 7 8 9
| you-get https://www.bilibili.com/video/BV1ST4y1E7FW?\from=search&seid=13389194302262225891
you-get -o z:/video https://www.bilibili.com/video/BV1ST4y1E7FW?\from=search&seid=13389194302262225891
you-get -format==flv720 https://www.bilibili.com/video/BV1ST4y1E7FW?\from=search&seid=13389194302262225891
|
注意的问题
我是win10 Home
版系统,会遇到问题:
‘seid’ 不是内部或外部命令,也不是可运行的程序或批处理文件。
解决方案:
将 &seid=
替换为3D
即可
一条完整的下载视频命令:
1
| you-get -o z:/video -format==flv720 https://www.bilibili.com/video/BV1ST4y1E7FW?\from=search&seid=13389194302262225891
|