X-Git-Url: https://projects.mako.cc/source/twitter-api-cdsw/blobdiff_plain/c63b39e25aac93634380365407e6b909d19dcd4f..1b5bb6edc34a0c0f3b4e3b97a7df8aa709ba9c9e:/twitter4.py diff --git a/twitter4.py b/twitter4.py index 918b565..3030edf 100644 --- a/twitter4.py +++ b/twitter4.py @@ -8,8 +8,7 @@ auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) api = tweepy.API(auth) # code to write the file -import codecs -output_file = codecs.open("MY_DATA.tsv", "w", "utf-8") +output_file = open("MY_DATA.tsv", "w", encoding="utf-8") public_tweets = api.search("data science", count=10)