-
-
Save benrules2/b1f219510400a3eff480184f5707477e to your computer and use it in GitHub Desktop.
Run main loop for Mirror Bot
This file contains hidden or 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
| if __name__ == "__main__": | |
| twitter_account = authorize_account() | |
| since = 1 | |
| while(True): | |
| #read all mentions since we last checked | |
| tweets = read_messages(twitter_account, since) | |
| since = tweets['since_id'] | |
| #iterate through messages, updating status | |
| for message in tweets['messages']: | |
| twitter_account.update_status(message[::-1]) | |
| #sleep 15 minutes and check again | |
| time.sleep(60 * 15) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment