Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tweepy
- from textblob import TextBlob
- consumer_key = ''
- consumer_secret = ''
- access_token = ''
- access_token_secret = ''
- auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
- auth.set_access_token(access_token, access_token_secret)
- api = tweepy.API(auth)
- public_tweets = api.search('bitcoin')
- for tweet in public_tweets:
- print(tweet.text)
- analysis = TextBlob(tweet.text)
- print(analysis.sentiment)
Add Comment
Please, Sign In to add comment