you-get 是py上一个方便的下载工具
项目主页:https://github.com/soimort/you-get
You-Get 主页:https://you-get.org/
You-Get 原版中文说明:https://github.com/soimort/you-get/wiki/中文说明/
作者:soimort
安装:
未安装python事先安装python,安装py最新版本
输入
pip3 install you-get
安装you-get
使用
可通过输入you-get或者you-get -h查看帮助信息,如
C:\Users\gl486>you-get
Usage: you-get [OPTION]... [URL]...
Startup options:
-V | --version Print version and exit.
-h | --help Print help and exit.
Dry-run options: (no actual downloading)
-i | --info Print extracted information.
-u | --url Print extracted information with URLs.
--json Print extracted URLs in JSON format.
Download options:
-n | --no-merge Do not merge video parts.
--no-caption Do not download captions.
(subtitles, lyrics, danmaku, ...)
-f | --force Force overwriting existed files.
-F | --format <STREAM_ID> Set video format to STREAM_ID.
-O | --output-filename <FILE> Set output filename.
-o | --output-dir <PATH> Set output directory.
-p | --player <PLAYER [OPTIONS]> Stream extracted URL to a PLAYER.
-c | --cookies <COOKIES_FILE> Load cookies.txt or cookies.sqlite.
-x | --http-proxy <HOST:PORT> Use an HTTP proxy for downloading.
-y | --extractor-proxy <HOST:PORT> Use an HTTP proxy for extracting only.
--no-proxy Never use a proxy.
-s | --socks-proxy <HOST:PORT> Use an SOCKS5 proxy for downloading.
-t | --timeout <SECONDS> Set socket timeout.
-d | --debug Show traceback and other debug info.
-I | --input-file Read non-playlist urls from file.
-P | --password <PASSWORD> Set video visit password to PASSWORD.
使用举例
我们以B站视频:https://www.bilibili.com/video/av6778814/?from=search&seid=14154322691319558545为例;
1.将下载文件保存在F盘的AA文件夹下(-o 后面为保存文件路径)
注:最好将下载网址加上引号
you-get -o F:/AA "https://www.bilibili.com/video/av6778814/?from=search&seid=14154322691319558545"
2.获取更多信息
you-get -i "https://www.bilibili.com/video/av6778814/?from=search&seid=14154322691319558545"
C:\Users\gl486>you-get -i "https://www.bilibili.com/video/av6778814/?from=search&seid=14154322691319558545"
site: Bilibili
title: 【排骨】空谷幽梦,收录于专辑《非月》
streams: # Available quality and codecs
[ DEFAULT ] _________________________________
- format: flv
container: flv
size: 79.1 MiB (82971843 bytes)
# download-with: you-get --format=flv [URL]
- format: hdmp4
container: mp4
size: 51.5 MiB (53952194 bytes)
# download-with: you-get --format=hdmp4 [URL]
- format: mp4
container: mp4
size: 23.1 MiB (24201771 bytes)
# download-with: you-get --format=mp4 [URL]
可通过-F选择视频格式
3.下载文件重命名
命名为cc(-O后面为文件名)
you-get -o F:/AA -O cc "https://www.bilibili.com/video/av6778814/?from=search&seid=14154322691319558545"
下载结果
注:如果想批量下载,写个py程序就好了