]> projects.mako.cc - twitter-api-cdsw/blobdiff - twitter4.py
fixed bugs and python3 updates for the twitter projects
[twitter-api-cdsw] / twitter4.py
index 918b565b37fa8af34b11efd8339c5f6dcf25c0a5..3030edf456d98aae05a5f76af8e9da2e1d965b72 100644 (file)
@@ -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)
 

Benjamin Mako Hill || Want to submit a patch?