Created
December 11, 2015 20:50
-
-
Save 0xv/ebed9d40403e666e633e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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