Browse Source

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.
totalwebcasting
Jaime Marquínez Ferrándiz 11 years ago
parent
commit
41292a3827
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      youtube_dl/__init__.py

+ 1
- 1
youtube_dl/__init__.py View File

@ -523,7 +523,7 @@ def _real_main(argv=None):
all_urls = batchurls + args all_urls = batchurls + args
all_urls = [url.strip() for url in all_urls] all_urls = [url.strip() for url in all_urls]
_enc = preferredencoding() _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() extractors = gen_extractors()


Loading…
Cancel
Save