YouTube-dl
下载地址
http://ytdl-org.github.io/youtube-dl/download.html
先点击下载并安装环境包 Microsoft Visual C++ 2010 Service Pack 1 Redistributable Package (x86)
然后点击下载 Windows.exe
下载完成之后,放到你指定的目录下
例如:
WIN+R输入cmd切换至youtube-dl文件目录下
输入以下命令
D:\Youtubedl>youtube-dl --version
2021.12.17
D:\Youtubedl>youtube-dl --help
Usage: youtube-dl [OPTIONS] URL [URL...]
Options:
General Options:
-h, --help Print this help text and exit
--version Print program version and exit
-U, --update Update this program to latest version. Make sure that you have sufficient permissions (run with
sudo if needed)
-i, --ignore-errors Continue on download errors, for example to skip unavailable videos in a playlist
--abort-on-error Abort downloading of further videos (in the playlist or the command line) if an error occurs
--dump-user-agent Display the current browser identification
--list-extractors List all supported extractors
--extractor-descriptions Output descriptions of all supported extractors
--force-generic-extractor Force extraction to use the generic extractor
--default-search PREFIX Use this prefix for unqualified URLs. For example "gvsearch2:" downloads two videos from google
videos for youtube-dl "large apple". Use the value "auto" to let youtube-dl guess ("auto_warning"
to emit a warning when guessing). "error" just throws an error. The default value "fixup_error"
repairs broken URLs, but emits an error if this is not possible instead of searching.
--ignore-config Do not read configuration files. When given in the global configuration file /etc/youtube-dl.conf:
Do not read the user configuration in ~/.config/youtube-dl/config (%APPDATA%/youtube-dl/config.txt
on Windows)
--config-location PATH Location of the configuration file; either the path to the config or its containing directory.
--flat-playlist Do not extract the videos of a playlist, only list them.
--mark-watched Mark videos watched (YouTube only)
--no-mark-watched Do not mark videos watched (YouTube only)
--no-color Do not emit color codes in output
Network Options:
--proxy URL Use the specified HTTP/HTTPS/SOCKS proxy. To enable SOCKS proxy, specify a proper scheme. For
example socks5://127.0.0.1:1080/. Pass in an empty string (--proxy "") for direct connection
--socket-timeout SECONDS Time to wait before giving up, in seconds
--source-address IP Client-side IP address to bind to
-4, --force-ipv4 Make all connections via IPv4
-6, --force-ipv6 Make all connections via IPv6
Geo Restriction:
--geo-verification-proxy URL Use this proxy to verify the IP address for some geo-restricted sites. The default proxy specified
by --proxy (or none, if the option is not present) is used for the actual downloading.
--geo-bypass Bypass geographic restriction via faking X-Forwarded-For HTTP header
--no-geo-bypass Do not bypass geographic restriction via faking X-Forwarded-For HTTP header
--geo-bypass-country CODE Force bypass geographic restriction with explicitly provided two-letter ISO 3166-2 country code
--geo-bypass-ip-block IP_BLOCK Force bypass geographic restriction with explicitly provided IP block in CIDR notation
Video Selection:
--playlist-start NUMBER Playlist video to start at (default is 1)
--playlist-end NUMBER Playlist video to end at (default is last)
--playlist-items ITEM_SPEC Playlist video items to download. Specify indices of the videos in the playlist separated by
commas like: "--playlist-items 1,2,5,8" if you want to download videos indexed 1, 2, 5, 8 in the
playlist. You can specify range: "--playlist-items 1-3,7,10-13", it will download the videos at
index 1, 2, 3, 7, 10, 11, 12 and 13.
--match-title REGEX Download only matching titles (regex or caseless sub-string)
--reject-title REGEX Skip download for matching titles (regex or caseless sub-string)
--max-downloads NUMBER Abort after downloading NUMBER files
--min-filesize SIZE Do not download any videos smaller than SIZE (e.g. 50k or 44.6m)
--max-filesize SIZE Do not download any videos larger than SIZE (e.g. 50k or 44.6m)
--date DATE Download only videos uploaded in this date
--datebefore DATE Download only videos uploaded on or before this date (i.e. inclusive)
--dateafter DATE Download only videos uploaded on or after this date (i.e. inclusive)
--min-views COUNT Do not download any videos with less than COUNT views
--max-views COUNT Do not download any videos with more than COUNT views
--match-filter FILTER Generic video filter. Specify any key (see the "OUTPUT TEMPLATE" for a list of available keys) to
match if the key is present, !key to check if the key is not present, key > NUMBER (like
"comment_count > 12", also works with >=, <, <=, !=, =) to compare against a number, key =
'LITERAL' (like "uploader = 'Mike Smith'", also works with !=) to match against a string literal
and & to require multiple matches. Values which are not known are excluded unless you put a
question mark (?) after the operator. For example, to only match videos that have been liked more
than 100 times and disliked less than 50 times (or the dislike functionality is not available at
the given service), but who also have a description, us