Main question:

At the moment, when I want to play music I have to go here: play.google.com/music/listen#/home

And then click the I'm Feeling Lucky icon or another playlist.

I would like to have a link that immediately starts autoplaying the I'm Feeling Lucky playlist or whatever. Does anyone know of such a thing?

Some background info:

I use my desktop as an alarm clock and can get it to run scripts at a certain time. I want to run a simple Python script in the morning that navigates to the URL and starts playing music upon startup like so:

import webbrowser
webbrowser.open("https://play.google.com/music/listen#/autoplay") # or whatever

I know I can do it using a webdriver like so:

from selenium import webdriver
browser = webdriver.Firefox()

But I'll have to set it up to login to my Google account which I don't want to bother with since I use two-step verification and it's also just less clean.

  • If you login once on the webbrowser and tell it to remember your account you won't have to have the script log you in again... Jun 5 '17 at 21:28

I had the same problem.

  1. Install the Chrome script from here https://greasyfork.org/en/scripts/30896-google-play-music-autoplay
    It will enable 'autoplay' option. It didn't work out of the box for me, but with minor changes you can make it click literally on anything you want (e.g., "Feeling Lucky" on the home page), the code there is pretty simple.
  2. Add &autoplay=true to your URL
  3. profit

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.