projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db4da14
)
[--load-info] Always read file as UTF-8
author
Philipp Hagemeister
<phihag@phihag.de>
Mon, 9 Dec 2013 03:59:50 +0000
(
04:59
+0100)
committer
Philipp Hagemeister
<phihag@phihag.de>
Mon, 9 Dec 2013 03:59:51 +0000
(
04:59
+0100)
This allows editing the file (and not escaping non-ASCII characters) and reloading it in.
youtube_dl/YoutubeDL.py
patch
|
blob
|
history
diff --git
a/youtube_dl/YoutubeDL.py
b/youtube_dl/YoutubeDL.py
index 79d5c7e5eb76087c77dbe523450c0da653868ea8..6538fc06cc75678de557a955935ec5c40fcc00c3 100644
(file)
--- a/
youtube_dl/YoutubeDL.py
+++ b/
youtube_dl/YoutubeDL.py
@@
-883,8
+883,7
@@
class YoutubeDL(object):
return self._download_retcode
def download_with_info_file(self, info_filename):
- with open(info_filename, 'r') as f:
- # TODO: Check for errors
+ with io.open(info_filename, 'r', encoding='utf-8') as f:
info = json.load(f)
try:
self.process_ie_result(info, download=True)