[GH-ISSUE #35] Can I play songs from python? #17

Closed
opened 2026-02-27 23:20:24 +03:00 by kerem · 7 comments
Owner

Originally created by @fraregom on GitHub (Nov 17, 2014).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/35

Hello Spotipy's people i have an question, i can play music from a python app using your libraries?

Originally created by @fraregom on GitHub (Nov 17, 2014). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/35 Hello Spotipy's people i have an question, i can play music from a python app using your libraries?
kerem closed this issue 2026-02-27 23:20:25 +03:00
Author
Owner

@thelinmichael commented on GitHub (Nov 18, 2014):

Spotify's Web API only supports 30 second clips, which you can retrieve using the Get Track endpoint. You can do playback of the full track using the mobile SDKs though.

<!-- gh-comment-id:63469918 --> @thelinmichael commented on GitHub (Nov 18, 2014): Spotify's Web API only supports 30 second clips, which you can retrieve using the Get Track endpoint. You can do playback of the full track using the mobile SDKs though.
Author
Owner

@jodal commented on GitHub (Nov 18, 2014):

You can play music from a Python app using pyspotify which is a Python wrapper around the old libspotify library from Spotify.

Disclaimer: I'm the author.

<!-- gh-comment-id:63471047 --> @jodal commented on GitHub (Nov 18, 2014): You can play music from a Python app using [pyspotify](https://pyspotify.mopidy.com/) which is a Python wrapper around the old libspotify library from Spotify. Disclaimer: I'm the author.
Author
Owner

@fraregom commented on GitHub (Nov 26, 2014):

Thank you, jodal !

<!-- gh-comment-id:64515248 --> @fraregom commented on GitHub (Nov 26, 2014): Thank you, jodal !
Author
Owner

@ffries commented on GitHub (Feb 12, 2017):

Thanks, but pyspotify is using a deprecated API.

The idea with new API would be to lauch a Spotify player somewhere (i.e. an Android connected to a HIFI) and use Spotipy as a remote control using playlist.

Machine A is running Spotipy in authenticated mode.
Machine B is running Spotify premium.

If I add a song in the playlist on A, will it play on B?

<!-- gh-comment-id:279240180 --> @ffries commented on GitHub (Feb 12, 2017): Thanks, but pyspotify is using a deprecated API. The idea with new API would be to lauch a Spotify player somewhere (i.e. an Android connected to a HIFI) and use Spotipy as a remote control using playlist. Machine A is running Spotipy in authenticated mode. Machine B is running Spotify premium. If I add a song in the playlist on A, will it play on B?
Author
Owner

@FiletZitas commented on GitHub (May 7, 2017):

Hi kellogsgit,

Did you manage to solve your problem? Would be great if someone could share a solution.
Thanks.

<!-- gh-comment-id:299730545 --> @FiletZitas commented on GitHub (May 7, 2017): Hi kellogsgit, Did you manage to solve your problem? Would be great if someone could share a solution. Thanks.
Author
Owner

@ritiek commented on GitHub (Jun 6, 2017):

It is possible to play music from 3rd parties like YouTube using python.

For free accounts, one way I can think of is using spotipy wrapper to get the name of the song by its spotipy http link. Then play that song by looking up on YouTube programatically. I think I'll spend some time building something like this really soon and later maybe merge it with mps-youtube?

UPDATE: mps-youtube can now match Spotify tracks on YouTube and play them (mps-youtube/mps-youtube#678).

<!-- gh-comment-id:306436890 --> @ritiek commented on GitHub (Jun 6, 2017): It is possible to play music from 3rd parties like YouTube using python. For free accounts, one way I can think of is using spotipy wrapper to get the name of the song by its spotipy http link. Then play that song by looking up on YouTube programatically. I think I'll spend some time building something like this really soon and later maybe merge it with [mps-youtube](https://github.com/mps-youtube/mps-youtube)? **UPDATE:** [mps-youtube](https://github.com/mps-youtube/mps-youtube) can now match Spotify tracks on YouTube and play them (mps-youtube/mps-youtube#678).
Author
Owner

@stephanebruckert commented on GitHub (Jan 11, 2020):

Looks like you could do that using preview mp3s (30 seconds) https://github.com/plamere/spotipy/issues/165

<!-- gh-comment-id:573344974 --> @stephanebruckert commented on GitHub (Jan 11, 2020): Looks like you could do that using preview mp3s (30 seconds) https://github.com/plamere/spotipy/issues/165
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#17
No description provided.