projects
/
twitter-api-cdsw-solutions
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2ada46e
)
fixed bugs and python3 updates for the twitter projects
author
Benjamin Mako Hill
<mako@atdot.cc>
Tue, 5 May 2015 00:15:57 +0000
(17:15 -0700)
committer
Benjamin Mako Hill
<mako@atdot.cc>
Tue, 5 May 2015 00:15:57 +0000
(17:15 -0700)
twitter2.py
patch
|
blob
|
history
twitter4.py
patch
|
blob
|
history
diff --git
a/twitter2.py
b/twitter2.py
index 89f03fabebc2b99661ce5f29dc6973e4e1d09a18..6d67a0f3e687c6ca911044001564525478e6b4d7 100644
(file)
--- a/
twitter2.py
+++ b/
twitter2.py
@@
-13,6
+13,6
@@
print(user.screen_name + " has " + str(user.followers_count) + " followers.")
print("They include these 100 people:")
-for friend in user.f
riend
s(count=100):
+for friend in user.f
ollower
s(count=100):
print(friend.screen_name)
diff --git
a/twitter4.py
b/twitter4.py
index 918b565b37fa8af34b11efd8339c5f6dcf25c0a5..3030edf456d98aae05a5f76af8e9da2e1d965b72 100644
(file)
--- 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)
Benjamin Mako Hill
||
Want to submit a patch?