hallo,
wie kann ich am besten den Track aus folgendem HTML Code auslesen
Quelltext
1: 2: 3: 4: 5: 6: 7: 8:
| <tbody> <tr class="rc_table_detail_alternative"> <th style="width: 100%;"> Krid P - Bagpipes </th> </tr>
</tbody> |
Das Problem ist das vor und nach "Krid P - Bagpipes" kein code ist!
Wenn ich
Quelltext
1: 2: 3: 4: 5:
| <tr class="rc_table_detail_alternative"> <th style="width: 100%;"> <a href="/release/various-artist/66/jump-bump-e-p-vol-5/">Interactive - Dildo 2008</a> </th> </tr> |
habe, dann kann ich es ja auslesen:
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23:
| . . . TrackPicStart := '/">'; TrackPicEnd := '</a>'; AText.Text := idhttp1.Get('http://www.technobase.fm/tracklist.php');
for i:= 0 to AText.Count -1 do begin FoundPos := Pos(TrackPicStart, AText.Text); if FoundPos = 0 then Exit; CurrentText := @AText.Text[FoundPos + Length(TrackPicStart)]; FoundPos := Pos(TrackPicEnd, CurrentText); if FoundPos = 0 then Exit; ATrack := Copy(CurrentText, 1, FoundPos - 1); AText.Text := CurrentText; . . . |
Weil ich kann ja die genaue Position des Tracks mit TrackPicStart := '/">' und TrackPicEnd := '</a>' ermitteln, nur wie geht es in dem obigen Beispiel??!
Moderiert von
Narses: Topic aus VCL (Visual Component Library) verschoben am Mo 24.08.2009 um 18:35