Skip to content

Instantly share code, notes, and snippets.

@MarkEEaton
Last active March 31, 2016 01:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkEEaton/044d27f9abb3ce56af63 to your computer and use it in GitHub Desktop.
Save MarkEEaton/044d27f9abb3ce56af63 to your computer and use it in GitHub Desktop.
Bot Day: Script 1
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Original script (kept up to date): https://github.com/robincamille/bot-tutorial/blob/master/mybot.py
# Twitter Bot Starter Kit: Bot 1
# This bot tweets three times, waiting 15 seconds between tweets.
# If you haven't changed credentials.py yet with your own Twitter
# account settings, this script will tweet at twitter.com/lacunybot
# Housekeeping: do not edit
import tweepy, time
from credentials import *
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_TOKEN, ACCESS_SECRET)
api = tweepy.API(auth)
# What the bot will tweet
tweetlist = ['Test tweet one!', 'Test tweet two!', 'Test tweet three!']
for line in tweetlist:
api.update_status(line)
print line
print '...'
time.sleep(15) # Sleep for 15 seconds
print "All done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment