Last active
January 5, 2018 09:03
-
-
Save miya/855ab5a147b90f8a132d30137d7b277f to your computer and use it in GitHub Desktop.
特定の文字列を含むツイートを自動でふぁぼるやつ
This file contains 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 | |
def api(): | |
consumer_key = 'consumer_key' | |
consumer_secret = 'consumer_secret' | |
access_key = 'access_key' | |
access_secret = 'access_secret' | |
auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
auth.set_access_token(access_key, access_secret) | |
api = tweepy.API(auth) | |
return api | |
for tweet in api().search('ビットコイン'): #文字列部はふぁぼりたい対象の単語 | |
id = tweet.id | |
api().create_favorite(id) #ふぁぼります |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment