From: Jaime Marquínez Ferrándiz Date: Sun, 5 Jan 2014 09:58:36 +0000 (+0100) Subject: Fix list comprehension for decoding the URLs (fixes #2100) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=41292a3827358708f909b44fa368ead0ee6c7eb7;p=youtube-dl 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. --- 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()