Skip to content

Commit e9b241b

Browse files
committed
English only streaming
1 parent 69e3609 commit e9b241b

File tree

2 files changed

+1402
-2
lines changed

2 files changed

+1402
-2
lines changed

streamwatcher.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ def main():
6060
print 'Invalid mode! Try again.'
6161

6262
if mode == 'sample':
63-
stream.sample()
63+
stream.sample(languages = 'en')
6464

6565
elif mode == 'filter':
6666
follow_list = raw_input('Users to follow (comma separated): ').strip()
6767
track_list = raw_input('Keywords to track (comma seperated): ').strip()
6868
#csvwriter = csv.writer(open("tweets.csv", "a"))
6969

70+
#stream.filter(languages = ["en"])
71+
#stream.filter(track = ["basketball"])
7072

7173
if follow_list:
7274
follow_list = [u for u in follow_list.split(',')]
@@ -92,8 +94,10 @@ def main():
9294
track_list = None
9395
#print follow_list
9496
#csvwriter.writerow([follow_list])
97+
#print(track_list[0])
9598
for i in xrange(5000):
96-
stream.filter(follow_list, track_list)
99+
stream.filter(track= [track_list[0]] ,languages = ["en"])
100+
#stream.filter(follow_list,track_list,languages = ["en"])
97101
#i = i + 1
98102

99103

0 commit comments

Comments
 (0)