From 99b0a1292b6ceccca576c8555e03bc13fb8e4bdd Mon Sep 17 00:00:00 2001 From: Filippo Valsorda Date: Wed, 26 Dec 2012 20:39:33 +0100 Subject: [PATCH] add --no-post-overwrites to README.md; + minor style fixes --- README.md | 2 ++ youtube_dl/InfoExtractors.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9dffd99ab..407b27970 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,8 @@ ## Post-processing Options: specific bitrate like 128K (default 5) -k, --keep-video keeps the video file on disk after the post- processing; the video is erased by default + --no-post-overwrites do not overwrite post-processed files; the post- + processed files are overwritten by default # CONFIGURATION diff --git a/youtube_dl/InfoExtractors.py b/youtube_dl/InfoExtractors.py index 697c031c5..210348080 100755 --- a/youtube_dl/InfoExtractors.py +++ b/youtube_dl/InfoExtractors.py @@ -2127,7 +2127,7 @@ def _real_extract(self, url): video_description = video_info.get('description', 'No description available.') url_map = video_info['video_urls'] - if len(list(url_map.keys())) > 0: + if url_map: # Decide which formats to download req_format = self._downloader.params.get('format', None) format_limit = self._downloader.params.get('format_limit', None) @@ -2987,7 +2987,7 @@ def _real_extract(self, url): if file_url is not None: break # got it! else: - if req_format not in list(formats.keys()): + if req_format not in formats: self._downloader.trouble(u'ERROR: format is not available') return