diff options
author | Mohamedh Fazal <mohamedhfazal@gmail.com> | 2013-11-19 18:59:22 +0500 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-11-20 06:14:57 +0100 |
commit | 9d1538182fdc540fa79ec8341385a980cde334e7 (patch) | |
tree | 873749ba1d5a9e28c5ef61da4200e50d6b6ad3f2 /youtube_dl/YoutubeDL.py | |
parent | 59040888112e7e5a22ef17bacc27ca88d58a5d92 (diff) |
Add an option to dump json information
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r-- | youtube_dl/YoutubeDL.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index fd5a30a0c..d8d55d7d7 100644 --- a/youtube_dl/YoutubeDL.py +++ b/youtube_dl/YoutubeDL.py @@ -84,6 +84,7 @@ class YoutubeDL(object): forcethumbnail: Force printing thumbnail URL. forcedescription: Force printing description. forcefilename: Force printing final filename. + forcejson: Force printing json information. simulate: Do not download the video files. format: Video format code. format_limit: Highest quality format to try. @@ -651,6 +652,8 @@ class YoutubeDL(object): compat_print(filename) if self.params.get('forceformat', False): compat_print(info_dict['format']) + if self.params.get('forcejson', False): + compat_print(json.dumps(info_dict)) # Do nothing else if in simulate mode if self.params.get('simulate', False): |