Parse Liquidsoap metadata
Salut !
J'utilise l'excellent moteur de streaming LiquidSap, mais j'ai un peu de mal avec le résultat de la commande alsa.metadata du serveur telnet.
Voici un exemple de sa sortie:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| --- 10 ---
source_url="http://liquidsoap.local:8020/radio"
title="anastacia - lumere lumera"
--- 9 ---
source_url="http://liquidsoap.local:8020/radio"
title="bob tostes - strangers in the night"
--- 8 ---
source_url="http://liquidsoap.local:8020/radio"
title="lucio battisti - amarsi un po"
--- 7 ---
source_url="http://liquidsoap.local:8020/radio"
title="george white group - nothing compares to you"
--- 6 ---
source_url="http://liquidsoap.local:8020/radio"
title="olivia - true colors"
--- 5 ---
source_url="http://liquidsoap.local:8020/radio"
title="ritmo del mundo - what s love got to do with it"
--- 4 ---
source_url="http://liquidsoap.local:8020/radio"
title="tania maria - come with me"
--- 3 ---
source_url="http://liquidsoap.local:8020/radio"
title="antonio carlos jobim a sting - how insentive"
--- 2 ---
source_url="http://liquidsoap.local:8020/radio"
title="dht - driver s seat"
--- 1 ---
source_url="http://liquidsoap.local:8020/radio"
title="marg nelson - lady marmelade" |
Il ne ressemble à aucun format connu .. csv, json, xml ...
Pouvez-vous me dire comment je pourrais faire un tableau Python?
exemple de structure du tableau:
Code:
1 2
| [10] => [source_url] => "http://liquidsoap.local:8020/radio", [title] => "anastacia - lumere lumera",
[9] => [source_url] => "http://liquidsoap.local:8020/radio", [title] => "bob tostes - strangers in the night" |
Merci