Created
November 3, 2016 00:30
-
-
Save benrules2/41c0358cb59008c9bc7c8adc76c0bfee to your computer and use it in GitHub Desktop.
Get Username Mentions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_messages(twitter_account, since = 0): | |
mentions = tweepy.Cursor(twitter_account.mentions_timeline, since_id = str(since)).items() | |
tweets = [] | |
for tweet in tweets: | |
tweets.append(tweet.text) | |
if (tweet.id > since): | |
since = tweet.id | |
return {"messages":tweets, "since_id": since} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment