Skip to content

Instantly share code, notes, and snippets.

@0xv
Created December 11, 2015 20:50
Show Gist options
  • Save 0xv/ebed9d40403e666e633e to your computer and use it in GitHub Desktop.
Save 0xv/ebed9d40403e666e633e to your computer and use it in GitHub Desktop.
import tweepy
consumer_key=""
consumer_secret=""
access_token=""
access_token_secret=""
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.secure = True
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
print(api.me().name)
class twitter():
"""docstring for twitter"""
def __init__(self, interface_layer):
self.routes = [
("/tw(eet)?\s(?P<text>[^\[]{1,500})\s?\[?(?P<lang>[A-Za-z\-]{2,6})?\]?$", self.update_status)
]
def update_status(self, message, match):
a = api.update_status(status=match.group("text"))
if a:
print "ikehh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment