Autor Beitrag
markusagb
Hält's aus hier
Beiträge: 15



BeitragVerfasst: Di 22.11.16 01:34 
Guten tag zusammen,

vielleicht kann mir jemand weiter helfen, ich habe da jetzt 1 Woche dran rumgedoktort. Ich benötige aus dem unten stehenden HTML (bekomme ich über gethtml) welches sich alle 5 sek aktualisiert folgende Daten:

Im Text steht der Tag "Current Song: " der immer gleich bleibt - danach folgt der Eintrag der sich aktualisiert und den ich auslesen muss, in diesem Fall wäre der Wert: "GERMANY'S HITRADIO - Das hörst Du gleich...".

Ich möchte natürlich noch 3-4 Daten mehr auslesen, aber wenn ich weis wie ich den Wert zu Current Song auslese dann kann ich den Rest auch.

Es wäre toll wenn mir jemand helfen könnte.

Danke schon mal an alle die sich die Zeit nehmen und das lesen!

Markus


ausblenden HTML-Dokument
1:
TML><HEAD><meta http-equiv="Content-Language" content="en-us"><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"><meta http-equiv="Pragma" content="no-cache"><meta http-equiv="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT"><title>SHOUTcast Administrator</title><style type="text/css"><!--a:link {color: blue; font-family:Arial, Helvetica; font-size:9pt;}a:visited {color: blue; font-family:Arial, Helvetica; font-size:9pt;}a:hover {color: red; font-family:Arial, Helvetica; font-size:9pt; }.default {color: White; font-family:Arial, Helvetica; font-size:9pt; font-weight: normal}.ST {color: White; font-family:Arial, Helvetica; font-size:8pt; font-weight: normal}.logoText {color: red; font-family: Arial Black, Helvetica, sans-serif; font-size25pt; font-weight: normal; letter-spacing : -2.5px;}.flagText {color: blue; font-family: webdings; font-size36pt; font-weight: normal; }.ltv {color: blue; font-family: Arial, Helvetica, sans-serif; font-size9pt; font-weight: normal;}.tnl {color: black; font-family: Arial, Helvetica, sans-serif; font-size10pt; font-weight: bold; text-decoration: none;}--></style></HEAD><BODY topmargin=0 leftmargin=0 marginheight=0 marginwidth=0 bgcolor=#000000 text=#EEEEEE link=#001155 vlink=#001155 alink=#FF0000><font class=default><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td height=50><font class=flagText>U</font><font class=logoText> SHOUTcast D.N.A.S. Status</font></td></tr><tr><td height=14 align=right><font class=ltv><a id=ltv href="http://www.shoutcast.com/">SHOUTcast Server Version 1.9.8/Linux</a></font></td></tr><tr><td bgcolor=#DDDDDD height=20 align=center><table width=100% border=0 cellpadding=0 cellspacing=0><tr><td align=center><font class=tnl><a id=tnl href="index.html">Status</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href="played.html">Song History</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href="listen.pls">Listen</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href="home.html">Stream URL</a></font></td><td align=center><font class=tnl> | </font></td><td align=center><font class=tnl><a id=tnl href="admin.cgi">Admin Login</a></font></td></tr></table></td></tr></table><br><table cellpadding=5 cellspacing=0 border=0 width=100%><tr><td bgcolor=#000025 colspan=2 align=center><font class=ST>Current Stream Information</font></td></tr></table><table cellpadding=2 cellspacing=0 border=0 align=center><tr><td width=100 nowrap><font class=default>Server Status: </font></td><td><font class=default><b>Server is currently up and public.</b></td></tr><tr><td width=100 nowrap><font class=default>Stream Status: </font></td><td><font class=default><b>Stream is up at 64 kbps with <B>9 of 100 listeners (9 unique)</b></b></td></tr><tr><td width=100 nowrap><font class=default>Listener Peak: </font></td><td><font class=default><b>58</b></td></tr><tr><td width=100 nowrap><font class=default>Average Listen Time: </font></td><td><font class=default><b>7h 41m 54s</b></td></tr><tr><td width=100 nowrap><font class=default>Stream Title: </font></td><td><font class=default><b>GERMANYS HITRADIO</b></td></tr><tr><td width=100 nowrap><font class=default>Content Type: </font></td><td><font class=default><b>audio/aacp</b></td></tr><tr><td width=100 nowrap><font class=default>Stream Genre: </font></td><td><font class=default><b>Top40</b></td></tr><tr><td width=100 nowrap><font class=default>Stream URL: </font></td><td><font class=default><b><a href="http://www.germanys-hitradio.com">http://www.germanys-hitradio.com</a></b></td></tr><tr><td width=100 nowrap><font class=default>Stream ICQ: </font></td><td><font class=default><b><a href="http://wwp.icq.com/scripts/contact.dll?msgto=NA">NA</a></b></td></tr><tr><td width=100 nowrap><font class=default>Stream AIM: </font></td><td><font class=default><b><a href="aim:goim?screenname=NA">NA</a></b></td></tr><tr><td width=100 nowrap><font class=default>Stream IRC: </font></td><td><font class=default><b><a href="http://www.shoutcast.com/chat.phtml?dc=%23">#</a></b></td></tr><tr><td width=100 nowrap><font class=default>Current Song: </font></td><td><font class=default><b>GERMANY'S HITRADIO - Das hörst Du gleich...</b></td></tr></table><br><table cellpadding=0 cellspacing=0 border=0 width=100%>  <tr><td bgcolor=#DDDDDD  nowrap colspan=5 align=center><table cellspacing=0 cellpadding=0 border=0><tr><td><font class=ltv>Written by Stephen 'Tag Loomis, Tom Pepper and Justin Frankel</font></td></tr></table></td></tr><tr><td nowrap colspan=5 align=center><font class=ST><b><a href="http://www.shoutcast.com/disclaimer.phtml">Copyright Nullsoft Inc</a><a href="/llamacookie">.</a> 1998-2004</b></font></td></tr></table></font></body></html>					


Moderiert von user profile iconChristian S.: HTML-Tags hinzugefügt
ub60
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 762
Erhaltene Danke: 127



BeitragVerfasst: Di 22.11.16 02:11 
Im konkreten Fall würde etwa folgendes reichen:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
Zeile:='<html>....</html>';
// Position von "Current Song"
p:=Pos('Current Song', Zeile);
// Position der Eingrenzung des Titels (ein folgendes <b>)  
p1:=PosEx('<b>', Zeile, p);
// Position der Eingrenzung des Titels (ein folgendes </b>)  
p2:=PosEx('</b>', Zeile, p1);

... und dann das Ganze mit Copy rauskopieren.

ub60
markusagb Threadstarter
Hält's aus hier
Beiträge: 15



BeitragVerfasst: Di 22.11.16 02:15 
Danke für die schnelle Antwort, da hätt ich tatsächlich auch drauf kommen können...
Ganz simpel, läuft und funktioniert!

Schönen Abend!