Skip to content

Instantly share code, notes, and snippets.

@minamorl
Last active July 27, 2016 04:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save minamorl/4386d80942ecaeff04dfc485cb7a0be7 to your computer and use it in GitHub Desktop.
Save minamorl/4386d80942ecaeff04dfc485cb7a0be7 to your computer and use it in GitHub Desktop.
gistに直接気持ちで書いたので動くか知らない
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