From c774b3c696b92d0e23f3c59849b8406aa26812c8 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 5 Jan 2014 05:24:50 +0100 Subject: [PATCH] Make sure URLs are always character strings (Fixes #2051) --- youtube_dl/__init__.py | 2 ++ 1 file changed, 2 insertions(+) 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() -- 2.22.2