RoboDocto
This is a basic Twitter bot with reply capabilities.
import tweepy
CONSUMER_KEY = 'S4U' CONSUMER_SECRET = 'Yyk4iCIP5GcI' ACCESS_TOKEN = '8cMI' ACCESS_TOKEN_SECRET = 'mUZM0i3Vk'
auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET) auth.set_access_token(ACCESS_TOKEN, ACCESS_TOKEN_SECRET) api = tweepy.API(auth)
twts = api.search(q="I hope I don't have the flu.")
list of specific strings we want to check for in Tweets
t = ["I hope I don't have the flu."]
for s in twts: for i in t: if i == s.text: sn = s.user.screen_name m = "@%s Hello! Check out https://vaccinefinder.org/ to find a flu shot near you!" % (sn) s = api.update_status(m, s.id)
Log in or sign up for Devpost to join the conversation.