Python beginners hit the unofficial API of Google Play Music to play music

Preface

I've never touched Python before this GUI? You don't know, Han is silent and hits the terminal, right?

The beginning of things

I found something like this related to google play music https://github.com/simon-weber/gmusicapi ↓ I've never touched python but it looks interesting

Environment construction etc.

environment

Windows10 Home 64bit Anaconda3-4.3.1 python-vlc gmusicapi https://github.com/simon-weber/gmusicapi Maybe VLC installation (maybe not needed)

First of all, Python

I didn't understand, but Anaconda seems to be easy https://www.continuum.io/downloads#windows

module

There seems to be a convenient thing called pip Install python-vlc, gmusicapi and urllib3 with pip

work

If you are looking for something useful Something like this Play Get Wild with Amazon Dash Button by Google Play Music (Failure on Chromebook)

Hmmmm

While wrestling with English http://unofficial-google-music-api.readthedocs.io/en/latest/index.html When https://github.com/simon-weber/gmusicapi/blob/develop/example.py Read and fish

Clogged point

I don't have much information on python-vlc, so I have to read the source myself

Also wrestle with English https://github.com/oaubert/python-vlc/blob/master/generated/vlc.py

API features are not so rich

I don't know how to pull a song from a playlist ↓ Let's search now ↓ search ↓ It takes time to process the returning dictionary ↓ Let's play the very first song that hit the search for the time being

After that, fighting earnestly

result

cap4-14.JPG

Something is displayed The sound flowed ah ah

problem

Stream stops in the middle cap4-14-2.JPG

Afterword

I was hit by the modern way of writing Python I wrestled for a few days, but after all it's easier to play normally I learned English I haven't tried Mac but it worked with python3 on Ubuntu 14.04

Github link

https://github.com/johejo/mygpm/blob/master/mygpm.py

4/15 postscript

There seems to be a bug in vlc.py in python-vlc. I got an Attribute Error when I tested it on a Mac terminal. I had a similar question on stack overflow. http://stackoverflow.com/questions/17440802/vlc-python-module-not-working-in-ubuntu

Results of various trials http://git.videolan.org/?p=vlc/bindings/python.git;a=tree;f=generated;b=HEAD Bring this vlc.py and replace it with the one in python-vlc and it seems to work fine.

You can check the path of vlc.py referenced by python-vlc with the following script.

check_vlc.py


import vlc
print(vlc.__file__)

None Object processing is Untara Kantara. .. .. .. .. It seems, but I didn't quite understand.

Recommended Posts

Python beginners hit the unofficial API of Google Play Music to play music
Play music by hitting the unofficial API of Google Play Music
[Python] Hit the Google Translation API
python beginners tried to predict the number of criminals
[Python] The biggest weakness / disadvantage of Google Colaboratory [For beginners]
Hit the Sesami API in Python
Hit the Etherpad-lite API with Python
Hit the web API in Python
Learn the basics of Python ① Beginners
An easy way to hit the Amazon Product API in Python
Hit the New Relic API in Python to get the server status
Regularly upload files to Google Drive using the Google Drive API in Python
Hit the Rakuten Ranking API to save the ranking of any category in CSV
I tried to get the authentication code of Qiita API with Python.
Hit a method of a class instance with the Python Bottle Web API
I tried to get the movie information of TMDb API with Python
The fastest way for beginners to master Python
I tried to touch the API of ebay
How to use the Google Cloud Translation API
Hit the Firebase Dynamic Links API in Python
Easy way to check the source of Python modules
Template of python script to read the contents of the file
How to get the number of digits in Python
[Python] Get the text of the law from the e-GOV Law API
[python] option to turn off the output of click.progressbar
the zen of Python
A story about a Python beginner trying to get Google search results using the API
Let's use the Python version of the Confluence API module.
PHP and Python samples that hit the ChatWork API
After hitting the Qiita API with Python to get a list of articles for beginners, we will visit the god articles
[Python] Summary of how to specify the color of the figure
How to hit the document of Magic Function (Line Magic)
[Introduction to Python] Basic usage of the library matplotlib
To do the equivalent of Ruby's ObjectSpace._id2ref in Python
Completely translated the site of "The Hitchhiker's Guide to Python"
Python Note: The mystery of assigning a variable to a variable
I tried to summarize the string operations of Python
I tried to find the entropy of the image with python
[Python] Change the Cache-Control of the object uploaded to Cloud Storage
Try to get the function list of Python> os package
About the camera change event of Google Maps Android API
Automatically organized mp3s downloaded from Google Play Music using Python
Make the display of Python module exceptions easier to understand
The first API to make with python Djnago REST framework
The story of introducing jedi (python auto-completion package) to emacs
■ Kaggle Practice for Beginners --Introduction of Python --by Google Colaboratory
Let's touch the API of Netatmo Weather Station with Python. #Python #Netatmo
Debug by attaching to the Python process of the SSH destination
Tips for Python beginners to use the Scikit-image example for themselves
I want to know the features of Python and pip
Beginners of Google Maps API and Twitter API made "tweet map"
What beginners learned from the basics of variables in python
Tweet Now Playing to Twitter using the Spotify API. [Python]
Google search for the last line of the file in Python
The story of creating a database using the Google Analytics API
Play with the password mechanism of GitHub Webhook and Python
Play with YouTube Data API v3 using Google API Python Client
Get the source of the page to load infinitely with python.
Hit Mastodon's API in Python
Towards the retirement of Python2
About the ease of Python