aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-05 10:58:36 +0100
committerJaime Marquínez Ferrándiz <jaime.marquinez.ferrandiz@gmail.com>2014-01-05 10:58:36 +0100
commit41292a3827358708f909b44fa368ead0ee6c7eb7 (patch)
tree898a66fc40916bf0720102396e88af49b9626130
parent20f1be02dffd27385f64d6d4e53e1ccdfdf19589 (diff)
Fix list comprehension for decoding the URLs (fixes #2100)
It wasn’t a comprehension, it was just using the last url from the previous comprehension. That didn’t raise an error in python 2, but in python 3 the variable was not defined.
-rw-r--r--youtube_dl/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py
index 6fb35faad..edaf1f1cd 100644
--- a/youtube_dl/__init__.py
+++ b/youtube_dl/__init__.py
@@ -523,7 +523,7 @@ def _real_main(argv=None):
all_urls = batchurls + args
all_urls = [url.strip() for url in all_urls]
_enc = preferredencoding()
- all_urls = [url.decode(_enc, 'ignore') if isinstance(url, bytes) else url]
+ all_urls = [url.decode(_enc, 'ignore') if isinstance(url, bytes) else url for url in all_urls]
extractors = gen_extractors()