Sunday, February 25, 2018

Stream Google Play Music using Python and gmusicapi

Parking this example of how to stream a random song from Google Play music using the gmusicapi python library. You will have to find your device id to plug into the script which can be done using the gmusicapi like so.

Then plugin your Google username and password and you are all set. This code example has a zbar example because I was using  a webcam to scan an QR code. The QR code had an artist name like Drake or The Chainsmokers or something. It would then pass the name into the search call and would select the first song from the songs returned from the search.



You can remove the zbar stuff and take in an argument for a search like so.

0 comments:

Post a Comment