From 41292a3827358708f909b44fa368ead0ee6c7eb7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Sun, 5 Jan 2014 10:58:36 +0100 Subject: [PATCH] Fix list comprehension for decoding the URLs (fixes #2100) MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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. --- youtube_dl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.22.2