aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/__init__.py
diff options
context:
space:
mode:
authorjakeogh <github.com@v6y.net>2013-05-05 22:30:07 -0700
committerjakeogh <github.com@v6y.net>2013-05-05 22:30:07 -0700
commit1a2adf3f49c700acc75c6b284927e61881bd7ea6 (patch)
tree86f0a4eed9d8f6ae57e1407af1d252ceb031f33f /youtube_dl/__init__.py
parent43b62accbb1b8701b24e4c9103de56e9e33288df (diff)
added --get-id option to print video IDs
Diffstat (limited to 'youtube_dl/__init__.py')
-rw-r--r--youtube_dl/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 1fc2fbcb4..80f3b9f33 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -216,6 +216,8 @@ def parseOpts(overrideArguments=None):
action='store_true', dest='geturl', help='simulate, quiet but print URL', default=False)
verbosity.add_option('-e', '--get-title',
action='store_true', dest='gettitle', help='simulate, quiet but print title', default=False)
+ verbosity.add_option('--get-id',
+ action='store_true', dest='getid', help='simulate, quiet but print id', default=False)
verbosity.add_option('--get-thumbnail',
action='store_true', dest='getthumbnail',
help='simulate, quiet but print thumbnail URL', default=False)
@@ -495,15 +497,16 @@ def _real_main(argv=None):
'usenetrc': opts.usenetrc,
'username': opts.username,
'password': opts.password,
- 'quiet': (opts.quiet or opts.geturl or opts.gettitle or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat),
+ 'quiet': (opts.quiet or opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat),
'forceurl': opts.geturl,
'forcetitle': opts.gettitle,
+ 'forceid': opts.getid,
'forcethumbnail': opts.getthumbnail,
'forcedescription': opts.getdescription,
'forcefilename': opts.getfilename,
'forceformat': opts.getformat,
'simulate': opts.simulate,
- 'skip_download': (opts.skip_download or opts.simulate or opts.geturl or opts.gettitle or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat),
+ 'skip_download': (opts.skip_download or opts.simulate or opts.geturl or opts.gettitle or opts.getid or opts.getthumbnail or opts.getdescription or opts.getfilename or opts.getformat),
'format': opts.format,
'format_limit': opts.format_limit,
'listformats': opts.listformats,