1
1
mirror of https://github.com/ytdl-org/youtube-dl synced 2024-11-27 13:06:49 +01:00

Make sure URLs are always character strings (Fixes #2051)

This commit is contained in:
Philipp Hagemeister 2014-01-05 05:24:50 +01:00
parent 3e34db3170
commit c774b3c696

View File

@ -522,6 +522,8 @@ def _real_main(argv=None):
sys.exit(u'ERROR: batch file could not be read') sys.exit(u'ERROR: batch file could not be read')
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()
all_urls = [url.decode(_enc, 'ignore') if isinstance(url, bytes) else url]
extractors = gen_extractors() extractors = gen_extractors()