Skip to content

Commit

Permalink
Need to edit indexing.py and combine indexing.py with twitter_api.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nithinvnath committed Mar 6, 2013
1 parent 8039dec commit a56aac6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion indexing.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def hasUrl (line):
#---------------------------------------------------------------------#
#function to check the presence of a username in the
#tweet
#EDIT: Can be taken directly from the tweet obtained. A field exists

def hasUsernames(line):
u=re.compile('\@[a-zA-Z0-9\_]+')
Expand Down Expand Up @@ -80,7 +81,7 @@ def isRetweet(tweet):
#expects a list of words
def hasProfanity(words):
count = 0
f = open('bad-words.txt','r')
f = open('./Corpus/bad-words.txt','r')
lis = []
for badword in f:
lis.append(badword.strip())
Expand Down
4 changes: 4 additions & 0 deletions twitter_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,7 @@
else:
print "Authentication failed!"

pub = api.home_timeline()

for tweet in pub:
print tweet.user.name + ":" + tweet.text

0 comments on commit a56aac6

Please sign in to comment.