You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
daz@iloveyou:~/metadata$ python metadata.py
Traceback (most recent call last):
File "metadata.py", line 1, in
from streamscrobbler import streamscrobbler
File "/home/daz/metadata/streamscrobbler.py", line 5
^
Here is my code:
from streamscrobbler import streamscrobbler
streamscrobbler = streamscrobbler()
##streamurl can be a url directly to the stream or to a pls file. Support for m3u is coming soon.
streamurl = "http://pubint.ic.llnwd.net/stream/pubint_kut"
stationinfo = streamscrobbler.getServerInfo(streamurl)
##metadata is the bitrate and current song
metadata = stationinfo.get("metadata")
## status is the integer to tell if the server is up or down, 0 means down, 1 up, 2 means up but also got metadata.
status = stationinfo.get("status")
not sure if this is helpful all these years later, but we've been using this lib for a while and have come up with a few fixes here: https://github.com/CGillen/streamscrobbler-python
this uses mostly code from #9
but includes a fix for the headers and also has a fix for the way the metadata is parsed, what we found is that the end of the metadata buffer was getting prematurely removed, there's more information in the fork @confact
Activity
GijsTimmers commentedon Jul 27, 2016
That url you posted does not look like a streaming url, and furthermore doesn't lead anywhere.
confact commentedon Aug 30, 2016
Seems to be a problem with the headers or something. because it works when copy and paste in chrome.
I am open with a pull request to fix this if you want @dazza5000
unknownpedestrian commentedon Jul 3, 2025
not sure if this is helpful all these years later, but we've been using this lib for a while and have come up with a few fixes here:
https://github.com/CGillen/streamscrobbler-python
this uses mostly code from #9
but includes a fix for the headers and also has a fix for the way the metadata is parsed, what we found is that the end of the metadata buffer was getting prematurely removed, there's more information in the fork @confact