aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/FileDownloader.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/FileDownloader.py
parent43b62accbb1b8701b24e4c9103de56e9e33288df (diff)
added --get-id option to print video IDs
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r--youtube_dl/FileDownloader.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/FileDownloader.py b/youtube_dl/FileDownloader.py
index 9b06633cc..eb68d9478 100644
--- a/youtube_dl/FileDownloader.py
+++ b/youtube_dl/FileDownloader.py
@@ -54,6 +54,7 @@ class FileDownloader(object):
quiet: Do not print messages to stdout.
forceurl: Force printing final URL.
forcetitle: Force printing title.
+ forceid: Force printing ID.
forcethumbnail: Force printing thumbnail URL.
forcedescription: Force printing description.
forcefilename: Force printing final filename.
@@ -574,6 +575,8 @@ class FileDownloader(object):
# Forced printings
if self.params.get('forcetitle', False):
compat_print(info_dict['title'])
+ if self.params.get('forceid', False):
+ compat_print(info_dict['id'])
if self.params.get('forceurl', False):
compat_print(info_dict['url'])
if self.params.get('forcethumbnail', False) and 'thumbnail' in info_dict: