summaryrefslogtreecommitdiff
path: root/JKTwitterBot/src/thebot.py
diff options
context:
space:
mode:
Diffstat (limited to 'JKTwitterBot/src/thebot.py')
-rw-r--r--JKTwitterBot/src/thebot.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/JKTwitterBot/src/thebot.py b/JKTwitterBot/src/thebot.py
index 9af84ba..5152490 100644
--- a/JKTwitterBot/src/thebot.py
+++ b/JKTwitterBot/src/thebot.py
@@ -58,6 +58,7 @@ def follow_user(user):
print '====> (TEST MODE) Following =', user
def reply_to_tweets():
+ lastid = ''
results = reader.search(q=username, since_id=lastid)['results']
for result in reversed(results):
asker = result['from_user']
@@ -84,6 +85,7 @@ def reply_to_tweets():
print '====> Resp = %s' % outgoing_text
try:
+ print outgoing_text
status_update(outgoing_text)
except TwitterError as e:
@@ -122,7 +124,8 @@ def ask_questions():
for follow_me in friend_list:
if not (follow_me in following_list):
- post = follow_me + ' ' + question[postnumber]
+ post = follow_me + ' ' + question[postnumber]
+ #print post
#status_update(post) #May want to ask everyone questions regardless of friendship
time.sleep(1)
postnumber = postnumber + 1
@@ -195,7 +198,7 @@ if __name__ == '__main__':
# commented out so all friends are not added
#for friend in friends: # adds all friends from friends.txt
- # follow_user(friend)
+ # follow_user(friend)
while True:
# Reply to tweets directed to us
@@ -204,6 +207,7 @@ if __name__ == '__main__':
# Send out a generic tweet
print count
status_update(tweet[count]) # post a status update
+ print tweet[count]
count = (count + 1) % len(tweet);
# Sleep for a bit to add some realism.
@@ -212,12 +216,9 @@ if __name__ == '__main__':
# Pose a question
status_update(question[count])
-
+ print question[count]
# Sleep for a bit to add some realism.
print 'Now sleeping... \n'
time.sleep(1) # set for 2min.
- ask_questions()
-
-
- \ No newline at end of file
+ ask_questions() \ No newline at end of file