From 1a2adf3f49c700acc75c6b284927e61881bd7ea6 Mon Sep 17 00:00:00 2001 From: jakeogh Date: Sun, 5 May 2013 22:30:07 -0700 Subject: added --get-id option to print video IDs --- youtube_dl/FileDownloader.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'youtube_dl/FileDownloader.py') 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: -- cgit v1.2.3