Merge pull request #7 from ayush-sharma/fix/utf8

Fixing utf-8 encoding when writing files.
pull/8/head v1.5.1
Ayush Sharma 2019-05-17 10:00:34 +05:30 committed by GitHub
commit 0c6a14acd1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -2,7 +2,6 @@ import helpers
import requests
from bs4 import BeautifulSoup
from pathlib import Path
import codecs
def getTweets():
@ -107,7 +106,9 @@ def tootTheTweet(tweet):
else:
tweet_check = codecs.open(tweet_check_file_path, mode='w', encoding='utf-8')
tweet['text'].encoding('utf-8')
tweet_check = open(tweet_check_file_path, mode='w')
tweet_check.write(tweet['text'])
tweet_check.close()