From 30a22e457ff714dd6cae58bd23b9260fa0bb9f20 Mon Sep 17 00:00:00 2001 From: zuoht Date: Tue, 16 Apr 2013 17:00:45 +0800 Subject: [PATCH] xiami album 3332 UnicodeEncodeError --- src/you_get/downloader/xiami.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/you_get/downloader/xiami.py b/src/you_get/downloader/xiami.py index 75c61b42..42f6b754 100644 --- a/src/you_get/downloader/xiami.py +++ b/src/you_get/downloader/xiami.py @@ -30,7 +30,7 @@ def location_dec(str): def xiami_download_lyric(lrc_url, file_name, output_dir): lrc = get_html(lrc_url, faker = True) if len(lrc) > 0: - with open(output_dir + "/" + file_name.replace('/', '-') + '.lrc', 'w') as x: + with open(output_dir + "/" + file_name.replace('/', '-') + '.lrc', 'w', encoding='utf-8') as x: x.write(lrc) def xiami_download_song(sid, output_dir = '.', merge = True, info_only = False):