diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2014-01-05 05:24:50 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2014-01-05 05:24:50 +0100 |
commit | c774b3c696b92d0e23f3c59849b8406aa26812c8 (patch) | |
tree | 71118673cdb491a4dd16fbed784e078f1dff57ed | |
parent | 3e34db31708e4ec6b936f9d09357319bf06f2c44 (diff) |
Make sure URLs are always character strings (Fixes #2051)
-rw-r--r-- | youtube_dl/__init__.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/youtube_dl/__init__.py b/youtube_dl/__init__.py index 26c1f0e74..6fb35faad 100644 --- a/youtube_dl/__init__.py +++ b/youtube_dl/__init__.py @@ -522,6 +522,8 @@ def _real_main(argv=None): sys.exit(u'ERROR: batch file could not be read') 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] extractors = gen_extractors() |