From 313f56f39ea57380255a72e709423882f21240cd Mon Sep 17 00:00:00 2001 From: Marian Steinbach Date: Mon, 9 Apr 2018 22:40:17 +0200 Subject: [PATCH] Set JSON output to UTF-8 encoding --- spider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spider.py b/spider.py index 9c42910..8929043 100644 --- a/spider.py +++ b/spider.py @@ -356,7 +356,7 @@ def main(): # Write result as JSON output_filename = os.path.join(result_path, "spider_result.json") with open(output_filename, 'w', encoding="utf8") as jsonfile: - json.dump(results2, jsonfile, indent=2, sort_keys=True) + json.dump(results2, jsonfile, indent=2, sort_keys=True, ensure_ascii=False) if __name__ == "__main__":