Created
June 2, 2009 16:19
-
-
Save zachseifts/122335 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
from sauce import Twitter | |
def write_heyer(replies): | |
last_reply_id = str(replies[len(replies)-1].id) | |
hf = open('.heyer', 'w') | |
hf.write(last_reply_id) | |
hf.close() | |
def main(): | |
hf = open('.heyer', 'r') | |
dot_heyer = hf.read() | |
hf.close() | |
api = Twitter(USERNAMW, PASSWORD) | |
if len(dot_heyer) == 0: | |
replies = api.get_replies() | |
write_heyer(replies) | |
else: | |
replies = api.get_replies(since_id=dot_heyer) | |
if len(replies) != 0: | |
write_heyer(replies) | |
for reply in replies: | |
api.post_tweet("@%s YOUR MESSAGE HERE" % reply.user.screen_name) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment