Skip to content

Instantly share code, notes, and snippets.

@s-wool
Last active December 29, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save s-wool/7627860 to your computer and use it in GitHub Desktop.
Save s-wool/7627860 to your computer and use it in GitHub Desktop.
gmusicapiのOauth認証
>>> 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