diff options
author | Philipp Hagemeister <phihag@phihag.de> | 2013-12-09 04:59:50 +0100 |
---|---|---|
committer | Philipp Hagemeister <phihag@phihag.de> | 2013-12-09 04:59:51 +0100 |
commit | 395293a88956a030f1be637748d50d216ff317a5 (patch) | |
tree | ed0fe57723da9b65d912cce31b1b3ce4cdb2b28c /youtube_dl | |
parent | db4da140273d119e6f75445ee6f8cc286523b63e (diff) |
[--load-info] Always read file as UTF-8
This allows editing the file (and not escaping non-ASCII characters) and reloading it in.
Diffstat (limited to 'youtube_dl')
-rw-r--r-- | youtube_dl/YoutubeDL.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py index 79d5c7e5e..6538fc06c 100644 --- 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) |