diff --git a/soup.py b/soup.py index 05bc68a..0413a94 100644 --- a/soup.py +++ b/soup.py @@ -218,7 +218,7 @@ def write_backlinks(backlinks_dict): parse_node_backlink(i) - with open(backlinks_dict[page]["path"], 'r+') as f: + with open(backlinks_dict[page]["path"], "w", encoding="utf-8") as f: f.write(str(soup)) print("write " + page + '!')