From 8403fcf0f2ea153e131629bccb5dbbd03ee1adb5 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Wed, 18 Nov 2020 23:45:06 +0400 Subject: [PATCH] Now op file is explicitly in utf-8. --- scrapthechan/cli/scraper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scrapthechan/cli/scraper.py b/scrapthechan/cli/scraper.py index 41f3745..dc30ccd 100644 --- a/scrapthechan/cli/scraper.py +++ b/scrapthechan/cli/scraper.py @@ -109,7 +109,7 @@ def main() -> None: if parser.op is None: print("No text's there.") elif not exists(join(save_dir, "!op.txt")): - with open(join(save_dir, "!op.txt"), 'w') as opf: + with open(join(save_dir, "!op.txt"), 'w', encoding='utf-8') as opf: opf.write(f"{parser.op}\n") print("Done.") else: