Last active
December 29, 2015 06:19
-
-
Save s-wool/7627860 to your computer and use it in GitHub Desktop.
gmusicapiのOauth認証
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
>>> from gmusicapi import Musicmanager | |
>>> mm = Musicmanager() | |
>>> mm.perform_oauth() | |
No handlers could be found for logger "oauth2client.util" | |
Visit the following url: | |
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fmusicmanager&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=652850857958.apps.googleusercontent.com&access_type=offline | |
#URLコピペしてブラウザから認証するとコードが表示されるので、↓にコピペします | |
Follow the prompts, then paste the auth code here and hit enter: your_auth_code | |
<oauth2client.client.OAuth2Credentials object at 0xf4e6d0> | |
>>> mm.login() | |
True | |
>>> mm.upload("your_mp3_file_path") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment