#!/home/psycojoker/code/python/ii-twitter/ve/bin/python
# encoding: utf-8

import argh
import tweepy


def main():
    auth = tweepy.OAuthHandler("KwayVtavdRYPKmnSuZO2w", "vvhA31BhosJdcpjmQJk8ORqp7M0whIDBlIAGqwAQ")

    var = raw_input("Go there: %s and write the token here:" % auth.get_authorization_url())
    auth.get_access_token(var)
    var = auth.access_token

    access_password = str(var).split("&")[0].split("=")[1]
    access_token = str(var).split("&")[1].split("=")[1]

    print "access token:", access_token
    print "access password:", access_password


if __name__ == '__main__':
    argh.dispatch_command(main)
