so i'm now trying to have now playing in my app
have i got this correct
i get an error...... error: invalid data
but i spoke to live365 they told me the stream thats in the now playing box
pulls the meta data from the stream?
so i'm now trying to have now playing in my app
have i got this correct
i get an error...... error: invalid data
but i spoke to live365 they told me the stream thats in the now playing box
pulls the meta data from the stream?
Any link to some documentation?
How does your Web GotText event look like?
This is provided as response content?
What do you get if you call that url in a browser?
Taifun
A box With play button
You test it
Also does this Metadata/info or "now playing" on exo player url stream - Discuss - Kodular Community
Still work at all? If it does would the stream I use
Work with the purple block?
you forgot to answer the questions
try it and let us know what you find out
Taifun
you just found out yourself, that the url does not return metadata, you get this instead
Taifun
yes live365 told me when they put that url in winamp or vlc
they get the metadata
the documentation we are looking for are not your blocks... it is a documentation which describes what exactly needs to be done to get the metadata of that stream
Taifun
ok where do i get that from?
did you read the document? obviously not
I now asked Gemini for you, below is the response
Taifun
Getting the current song metadata for a stream playing on Live365.com requires inspecting the web player's network activity, as the platform does not provide a single, public-facing, documented API for all streams.
The most reliable technical method for retrieving this information is by using your web browser's Developer Tools.
Here are the general steps to find the metadata endpoint:
F12 on Windows/Linux, or Cmd + Option + I on macOS).nowplaying, station, or the stream ID.https://api.live365.com/station/[station_id], which, when inspected, will contain the streaming URLs and sometimes the current track information.You can see a video about scraping websites by finding the API endpoint, which is the core technique needed to retrieve the Live365 metadata.
Scrape LIVE scores - No BeautifulSoup or Selenium NEEDED!
The task of programmatically getting Live365 stream metadata in an App Inventor app is essentially a three-step process: Connecting, Retrieving, and Parsing the data from the identified API endpoint.
This assumes you have successfully identified the specific API URL (the "metadata endpoint") that Live365 uses to send the current song information, as described in the previous response.
You'll need to use the following built-in components in the Designer:
Web component: To make the HTTP request to the Live365 API URL.Clock component: To periodically check the API for new metadata (e.g., every 5 to 10 seconds).Label components: To display the extracted Artist and Title on the screen.Use the Clock component to call the API on a regular interval.
Clock.TimerInterval property (e.g., to 5000 milliseconds for a 5-second refresh).Clock.Timer block, set the Web1.Url to the specific metadata endpoint URL you found (e.g., https://api.live365.com/station/[station_id]/nowplaying).Web1.Get block. This sends the request to the server.When the server responds, the Web1.GotText event is triggered. This block will contain the JSON data.
responseCode parameter to ensure the request was successful (it should be 200).Web.JsonTextDecodeWithDictionaries block on the responseContent parameter. This converts the raw JSON text into an App Inventor dictionary or list of dictionaries.Once the JSON is decoded into a dictionary, you can extract the Artist and Title.
lookup in dictionary or get value at key path block to navigate the dictionary structure.Label components with the extracted values.Example Blocks Logic (Conceptual):
WHEN
Clock1.TimerDO→ SET
Web1.UrlTO"YOUR_LIVE365_API_URL"→ CALL
Web1.GetWHEN
Web1.GotTextresponseCoderesponseContentDO→ IF
responseCode= 200 THEN→ SET
json_dataTO CALLWeb1.JsonTextDecodeWithDictionariesresponseContent→ SET
Label_Artist.TextTO CALLlookup in dictionarykey"artist"dictionaryjson_data→ SET
Label_Title.TextTO CALLlookup in dictionarykey"title"dictionaryjson_data
This approach leverages the Web component as the standard method in App Inventor for interacting with a web API that returns JSON data.
You can learn more about how to handle the received JSON data in App Inventor by watching this tutorial on using Web APIs with JSON.
http://googleusercontent.com/youtube_content/1
live365 don't have an api
read my previous answer again, I added some more information at the beginning to find out the metadata endpoint...
Taifun
I remove those two in DO
Then we're the arrows are I change them two to
Json_data if I'm understanding you correctly?
What about first finding out; what was returned in response content before blindly trying to extract some data?
Taifun
'Yeeess' it's working!
now, as this is a sharing community, what about sharing your working solution, so someone else with the same question in future can learn from your solution?
Taifun