diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-05-09 16:52:54 -0700 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-05-09 16:52:54 -0700 |
commit | b08980412eb05250100f95bf2c2c8bb764c4b4c5 (patch) | |
tree | c6ab492655a41c2d518e86841d6f3f39ce020028 /youtube_dl/FileDownloader.py | |
parent | 532a1e042964e698610908a0c3fde5188dce8f26 (diff) | |
parent | 1a2adf3f49c700acc75c6b284927e61881bd7ea6 (diff) |
Merge pull request #826 from jakeogh/master
Added --get-id option to print video IDs
Diffstat (limited to 'youtube_dl/FileDownloader.py')
-rw-r--r-- | youtube_dl/FileDownloader.py | 3 |
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: |