Skip to content
Snippets Groups Projects
Unverified Commit 034e3060 authored by davegii's avatar davegii Committed by GitHub
Browse files

Update twitter.py

parent 80b88351
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,7 @@ import preprocessor as p ...@@ -10,10 +10,7 @@ import preprocessor as p
import analysis import analysis
import emoji import emoji
consumer_key = "eWDIfDxXrYCfIcZmrnyqDa8MF" #Place Key from CMT here
consumer_secret = "rK86MTAtzC8mVcZfs4ximI2TXcZGCQub7q3GnlGQtgIvJiXdn7"
access_key= "1465826212861943809-JKsYmTnPRKN2UEuzO1gZhLph0mmdqA"
access_secret = "Jhl8q3suY45Avrm2SgchC8BsqNzoVvkB8enAukuXFTRu9"
# Remove Emojis # Remove Emojis
def give_emoji_free_text(text): def give_emoji_free_text(text):
...@@ -35,4 +32,4 @@ new_search = search_words + " -filter:retweets" ...@@ -35,4 +32,4 @@ new_search = search_words + " -filter:retweets"
for tweets in api.search_tweets(q=new_search, lang="en", count=100, since_id=0): for tweets in api.search_tweets(q=new_search, lang="en", count=100, since_id=0):
print(tweets.text) print(tweets.text)
text = give_emoji_free_text(text=tweets.text) text = give_emoji_free_text(text=tweets.text)
analysis.overall_sentiment(text) analysis.overall_sentiment(text)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment