mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-21 20:46:36 -05:00
[--load-info] Always read file as UTF-8
This allows editing the file (and not escaping non-ASCII characters) and reloading it in.
This commit is contained in:
parent
db4da14027
commit
395293a889
1 changed files with 1 additions and 2 deletions
|
@ -883,8 +883,7 @@ def download(self, url_list):
|
||||||
return self._download_retcode
|
return self._download_retcode
|
||||||
|
|
||||||
def download_with_info_file(self, info_filename):
|
def download_with_info_file(self, info_filename):
|
||||||
with open(info_filename, 'r') as f:
|
with io.open(info_filename, 'r', encoding='utf-8') as f:
|
||||||
# TODO: Check for errors
|
|
||||||
info = json.load(f)
|
info = json.load(f)
|
||||||
try:
|
try:
|
||||||
self.process_ie_result(info, download=True)
|
self.process_ie_result(info, download=True)
|
||||||
|
|
Loading…
Reference in a new issue