diff --git a/social.py b/social.py index 1125e3d..08564c6 100644 --- a/social.py +++ b/social.py @@ -2,6 +2,7 @@ import helpers import requests from bs4 import BeautifulSoup from pathlib import Path +import codecs def getTweets(): @@ -97,7 +98,7 @@ def tootTheTweet(tweet): else: - tweet_check = open(tweet_check_file_path, 'w') + tweet_check = codecs.open(tweet_check_file_path, mode='w', encoding='utf-8') tweet_check.write(tweet['text']) tweet_check.close()