1
0
Fork 0
mirror of https://codeberg.org/polarisfm/youtube-dl.git synced 2024-12-22 07:42:22 +00:00

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.
This commit is contained in:
Jaime Marquínez Ferrándiz 2014-01-05 10:58:36 +01:00
parent 20f1be02df
commit 41292a3827

View file

@ -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()