mirror of
https://github.com/l1ving/youtube-dl
synced 2025-03-09 10:40:02 +08:00
[dump-video-list-only] Add option to dump video list only
This commit is contained in:
parent
e6664d3bc6
commit
dbd292c621
@ -925,6 +925,11 @@ class YoutubeDL(object):
|
||||
|
||||
ie_entries = ie_result['entries']
|
||||
|
||||
if self.params.get("dump_video_list_only", False):
|
||||
# ie_entries is a generator, so it depletes when we iterate through it and no videos remain for download
|
||||
for entry in ie_entries:
|
||||
print(entry)
|
||||
|
||||
def make_playlistitems_entries(list_ie_entries):
|
||||
num_entries = len(list_ie_entries)
|
||||
return [
|
||||
|
@ -335,6 +335,7 @@ def _real_main(argv=None):
|
||||
'forceformat': opts.getformat,
|
||||
'forcejson': opts.dumpjson or opts.print_json,
|
||||
'dump_single_json': opts.dump_single_json,
|
||||
'dump_video_list_only': opts.dump_video_list_only,
|
||||
'simulate': opts.simulate or any_getting,
|
||||
'skip_download': opts.skip_download,
|
||||
'format': opts.format,
|
||||
|
@ -602,6 +602,10 @@ def parseOpts(overrideArguments=None):
|
||||
'--get-id',
|
||||
action='store_true', dest='getid', default=False,
|
||||
help='Simulate, quiet but print id')
|
||||
verbosity.add_option(
|
||||
'--dump-video-list-only',
|
||||
action='store_true', dest='dump_video_list_only', default=False,
|
||||
help='Just dump the list of videos in a channel/playlist and do not perform other requests. Use together with -i and -q to obtain parseable JSON Lines format.')
|
||||
verbosity.add_option(
|
||||
'--get-thumbnail',
|
||||
action='store_true', dest='getthumbnail', default=False,
|
||||
|
Loading…
x
Reference in New Issue
Block a user