Last active
July 27, 2016 04:53
-
-
Save minamorl/4386d80942ecaeff04dfc485cb7a0be7 to your computer and use it in GitHub Desktop.
gistに直接気持ちで書いたので動くか知らない
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 staccato | |
import time | |
# must be replaced | |
consumer_key = "YOURS" | |
consumer_secret = "YOURS" | |
access_token_key = "YOURS" | |
access_token_secret = "YOURS" | |
TARGET = "username" | |
SLEEP_TIME = 5 | |
def main(): | |
api = staccato.startup() | |
api.auth(consumer_key, consumer_secret, access_token_key, access_token_secret) | |
target_followings = api.friends_ids(screen_name=TARGET, count=5000) | |
for user_id in target_followings["ids"]: | |
api.friendships_create(user_id=user_id) | |
time.sleep(SLEEP_TIME) | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment