projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e34db3
)
Make sure URLs are always character strings (Fixes #2051)
author
Philipp Hagemeister
<phihag@phihag.de>
Sun, 5 Jan 2014 04:24:50 +0000
(
05:24
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Sun, 5 Jan 2014 04:24:50 +0000
(
05:24
+0100)
youtube_dl/__init__.py
patch
|
blob
|
history
diff --git
a/youtube_dl/__init__.py
b/youtube_dl/__init__.py
index 26c1f0e74b71b2d407b2803c932d789c5880d249..6fb35faadea319857b11fe5c44a0e988830d89c6 100644
(file)
--- 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()