mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-07 07:17:21 +08:00
Add an option to download all music videos from a youtube user
This commit is contained in:
parent
2dbc0967f2
commit
d694c4eec5
21
README.md
21
README.md
@ -77,8 +77,8 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
repairs broken URLs, but emits an error if
|
repairs broken URLs, but emits an error if
|
||||||
this is not possible instead of searching.
|
this is not possible instead of searching.
|
||||||
--ignore-config Do not read configuration files. When given
|
--ignore-config Do not read configuration files. When given
|
||||||
in the global configuration file
|
in the global configuration file /etc
|
||||||
/etc/youtube-dl.conf: Do not read the user
|
/youtube-dl.conf: Do not read the user
|
||||||
configuration in ~/.config/youtube-
|
configuration in ~/.config/youtube-
|
||||||
dl/config (%APPDATA%/youtube-dl/config.txt
|
dl/config (%APPDATA%/youtube-dl/config.txt
|
||||||
on Windows)
|
on Windows)
|
||||||
@ -108,8 +108,8 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
proxy specified by --proxy (or none, if the
|
proxy specified by --proxy (or none, if the
|
||||||
option is not present) is used for the
|
option is not present) is used for the
|
||||||
actual downloading.
|
actual downloading.
|
||||||
--geo-bypass Bypass geographic restriction via faking
|
--geo-bypass Bypass geographic restriction via faking X
|
||||||
X-Forwarded-For HTTP header
|
-Forwarded-For HTTP header
|
||||||
--no-geo-bypass Do not bypass geographic restriction via
|
--no-geo-bypass Do not bypass geographic restriction via
|
||||||
faking X-Forwarded-For HTTP header
|
faking X-Forwarded-For HTTP header
|
||||||
--geo-bypass-country CODE Force bypass geographic restriction with
|
--geo-bypass-country CODE Force bypass geographic restriction with
|
||||||
@ -130,6 +130,8 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
specify range: "--playlist-items
|
specify range: "--playlist-items
|
||||||
1-3,7,10-13", it will download the videos
|
1-3,7,10-13", it will download the videos
|
||||||
at index 1, 2, 3, 7, 10, 11, 12 and 13.
|
at index 1, 2, 3, 7, 10, 11, 12 and 13.
|
||||||
|
--user-music None Downloads all the music videos of a youtube
|
||||||
|
user (doesnt work if its a channel)
|
||||||
--match-title REGEX Download only matching titles (regex or
|
--match-title REGEX Download only matching titles (regex or
|
||||||
caseless sub-string)
|
caseless sub-string)
|
||||||
--reject-title REGEX Skip download for matching titles (regex or
|
--reject-title REGEX Skip download for matching titles (regex or
|
||||||
@ -258,12 +260,11 @@ Alternatively, refer to the [developer instructions](#developer-instructions) fo
|
|||||||
jar in
|
jar in
|
||||||
--cache-dir DIR Location in the filesystem where youtube-dl
|
--cache-dir DIR Location in the filesystem where youtube-dl
|
||||||
can store some downloaded information
|
can store some downloaded information
|
||||||
permanently. By default
|
permanently. By default $XDG_CACHE_HOME
|
||||||
$XDG_CACHE_HOME/youtube-dl or
|
/youtube-dl or ~/.cache/youtube-dl . At the
|
||||||
~/.cache/youtube-dl . At the moment, only
|
moment, only YouTube player files (for
|
||||||
YouTube player files (for videos with
|
videos with obfuscated signatures) are
|
||||||
obfuscated signatures) are cached, but that
|
cached, but that may change.
|
||||||
may change.
|
|
||||||
--no-cache-dir Disable filesystem caching
|
--no-cache-dir Disable filesystem caching
|
||||||
--rm-cache-dir Delete all filesystem cache files
|
--rm-cache-dir Delete all filesystem cache files
|
||||||
|
|
||||||
|
@ -80,6 +80,11 @@ def _real_main(argv=None):
|
|||||||
write_string(std_headers['User-Agent'] + '\n', out=sys.stdout)
|
write_string(std_headers['User-Agent'] + '\n', out=sys.stdout)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
# When usermusic option is activated, no need for url
|
||||||
|
if opts.usermusic is not None:
|
||||||
|
url = "https://www.youtube.com/user/"+opts.usermusic+"/videos?view=64&flow=grid"
|
||||||
|
args.append(url)
|
||||||
|
|
||||||
# Batch file verification
|
# Batch file verification
|
||||||
batch_urls = []
|
batch_urls = []
|
||||||
if opts.batchfile is not None:
|
if opts.batchfile is not None:
|
||||||
|
@ -267,6 +267,10 @@ def parseOpts(overrideArguments=None):
|
|||||||
'--playlist-items',
|
'--playlist-items',
|
||||||
dest='playlist_items', metavar='ITEM_SPEC', default=None,
|
dest='playlist_items', metavar='ITEM_SPEC', default=None,
|
||||||
help='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.')
|
help='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.')
|
||||||
|
selection.add_option(
|
||||||
|
'--user-music',
|
||||||
|
dest='usermusic',
|
||||||
|
help='Downloads all the music videos of a youtube user (doesnt work if its a channel)')
|
||||||
selection.add_option(
|
selection.add_option(
|
||||||
'--match-title',
|
'--match-title',
|
||||||
dest='matchtitle', metavar='REGEX',
|
dest='matchtitle', metavar='REGEX',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user