Autor Beitrag
Flamefire
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 15:10 
Ich hab eine Zeichenkette (HTML-Code aus einer datei) in einem Memofeld...
jetzt will ich bestimmte Daten daraus auslesen
dort gibts in der HTML-Datei eine Tabelle mit mehreren Spalten:
genauer gesagt: diese Tabelle mit den Kurslisten:
www.flife.de/kl.php?std_id=1
ich will jetzt die Linkaddresse, den Namen und die Kursveränderung einlesen...
dummerweise ist das ganze ding für einen String zu lang(es passt nicht alles rein)
was kann ich machen und wie durchsuche ich den String dann nach diesen Angaben? (Regexp geht ja nicht...zumindest nicht ohne Plugin)
Danke schonmal
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 03.01.07 15:14 
Ein Text kann für einen String nicht zu lang sein - außer der Arbeitsspeicher geht aus, aber dann passt das ganze auch nicht in ein Memo ;-). Wenn du den Text nicht in einen String bekommst, hat das andere Gründe.

Und wegen Finden/Ausschneiden hilft Suche in der Entwickler-Ecke POS [Finden] und Suche in der Entwickler-Ecke COPY [Ausschneiden].

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.01.07 15:14 
Zu lang für einen String? Für einen ShortString vielleicht, der darf nur 256 Zeichen haben, aber "heutige" Strings sind AnsiStrings und die dürfen bis zu 2 GiB groß sein.

// EDIT: Ach Mist, ich hätt nicht während der Antwort noch den anderen Thread lesen sollen... Diesmal hast du es geschafft... :lol:
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 15:18 
er ist aber zulang...ich hab den text über nen buffer in ein string eingelesen und am ende fehlt ein teil...
die ausgabe hab ich als neue zeile im memofeld gemacht...
zur suche: gehts nicht einfacher? genau nach der tabelle suchen (DOM-ähnlich)?
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Mi 03.01.07 15:22 
Könntest du mal den Source zeigen, bei dem du den Buffer in den String einliest? Wie gesagt - Strings haben [fast] keine Begrenzung bei der Länge [außer eben die 2 GB und der RAM].

Ohne RegEx, lässt sich da nicht viel einfacher machen.

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.01.07 15:26 
Naja, über einen Buffer? Kann es sein, dass du mit String[255] oder so arbeitet? Das ist dann in der Tat ein String der Länge 255. Aber zeig mal deinen Code, dann sehen wir das ja.
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 15:27 
code kommt in ner halben stunde...muss pc wechseln...
nein ich hab als definition: var xxx:String;
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 03.01.07 15:48 
Hallo

eine Zeile ist in innnerhalb einer tabelle >table> bis </table>
mit <tr> und </tr> eingegrenzt, eine Spalte mit </td><td ??>
Wenn du im Text zwischen '</td><td' ein CRLF einfügst wird
NeuerString := StringReplace(EingabeString,'</td><td','</td>'+#13#10+<td',[rfReplaceAll,rfIgnoreCase]);
ausblenden Quelltext
1:
<tr><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" height="14"> <b><a href="javascript:winopen('/cmp_real.php?sec_id=1000731955')"><nobr>Aareal Bank</nobr></a></b></td><tD bgcolor="#E1EEFC"><a href="http://www.flife.de/cmp_profil.php?sec_id=1000731955&sec_isin=DE0005408116" target="_blank"><img src="/i/cs_pt.gif" width="13" border=0 alt="Zum Unternehmensprofil Aareal Bank"></a></td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10c>L&S</td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10c>14:02</td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r>36,42 </td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r>36,49 </td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r style="color:#219C08">+0,97</td><td bgcolor="#E1EEFC" align=right><img src="/i/st.gif" width=1 height=10 border=0></td><td bgcolor="#E1EEFC"><img src="/i/s_gruen.gif" width="8.1572273879966" height=10></td><td bgcolor="#E1EEFC" class=t10r style="color:#219C08">2,72%</td><td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td></tr>					

zu
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
<tr>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td>
<td bgcolor="#E1EEFC" height="14"> <b><a href="javascript:winopen('/cmp_real.php?sec_id=1000731955')"><nobr>Aareal Bank</nobr></a></b></td>
<tD bgcolor="#E1EEFC"><a href="http://www.flife.de/cmp_profil.php?sec_id=1000731955&sec_isin=DE0005408116" target="_blank"><img src="/i/cs_pt.gif" width="13" border=0 alt="Zum Unternehmensprofil Aareal Bank"></a></td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10c>L&S</td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10c>14:02</td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r>36,42 </td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r>36,49 </td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td><td bgcolor="#E1EEFC" class=t10r style="color:#219C08">+0,97</td>
<td bgcolor="#E1EEFC" align=right><img src="/i/st.gif" width=1 height=10 border=0></td>
<td bgcolor="#E1EEFC"><img src="/i/s_gruen.gif" width="8.1572273879966" height=10></td><td bgcolor="#E1EEFC" class=t10r style="color:#219C08">2,72%</td>
<td bgcolor="#b4b4b4" width=1><spacer type=block width=1></td>
</tr>


Einfacher:
suche mit PosEx (Unit strUtils) einfach nach
'/cmp_real.php?sec_id=' dahinter kommt dann ja der Name der Aktie und du bist in der Spalte 2 der Tabelle,
dann nach ask und Bid nach 'class=t10r>' suchen und der text ist bis zum nächsten </td>
usw.
Alternativ:
Ich habe mal ein Programm zum zerfleddern von html geschrieben das Ergebnis:
ausblenden volle Höhe Quelltext
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:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
 : : : : :
 : Name: : Börse: : Zeit: : Bid: : Ask: : Veränderung zum Vortag: :
 :
 : : : : Aareal Bank: : : : : : : L&S: : 14:26: : 36,46: : 36,48: : +0,98: : : 2,76%: :
 : : : : AMB Generali: : : : : : : L&S: : 14:29: : 110,01: : 110,29: : +0,86: : : 0,79%: :
 : : : : AWD: : : : : : : L&S: : 14:26: : 32,22: : 32,24: : +0,04: : : 0,12%: :
 : : : : Beiersdorf: : : : : : : L&S: : 14:29: : 49,88: : 49,89: : -0,23: : : -0,45%: :
 : : : : Bilfinger Berg: : : : : : : L&S: : 14:29: : 57,15: : 57,18: : +0,74: : : 1,30%: :
 : : : : Celesio: : : : : : : L&S: : 19:17: : 70,00: : 75,00: : +0,16: : : 0,22%: :
 : : : : DEPFA BANK PLC: : : : : : : L&S: : 14:29: : 14,29: : 14,30: : +0,38: : : 2,69%: :
 : : : : Deutz: : : : : : : L&S: : 14:29: : 10,71: : 10,74: : -0,25: : : -2,23%: :
 : : : : Douglas Hldg.: : : : : : : L&S: : 14:29: : 40,22: : 40,27: : +0,86: : : 2,17%: :
 : : : : Dt. Euroshop: : : : : : : L&S: : 14:23: : 56,96: : 56,99: : -0,56: : : -0,96%: :
 : : : : EADS: : : : : : : L&S: : 14:29: : 26,27: : 26,32: : -0,01: : : -0,02%: :
 : : : : Fraport: : : : : : : L&S: : 14:23: : 55,50: : 55,54: : +0,40: : : 0,73%: :
 : : : : Fresenius Vz: : : : : : : L&S: : 14:29: : 163,21: : 163,29: : +0,39: : : 0,24%: :
 : : : : GEA Group AG: : : : : : : L&S: : 14:23: : 17,29: : 17,32: : -0,34: : : -1,90%: :
 : : : : Hannover Rück : : : : : : : L&S: : 14:29: : 34,91: : 34,92: : +0,04: : : 0,10%: :
 : : : : Heidelb.Druckm: : : : : : : L&S: : 14:29: : 36,21: : 36,25: : -0,13: : : -0,36%: :
 : : : : HeidelbergCeme: : : : : : : L&S: : 14:26: : 111,60: : 111,98: : -0,87: : : -0,77%: :
 : : : : Hochtief: : : : : : : L&S: : 14:29: : 55,55: : 55,60: : -0,17: : : -0,30%: :
 : : : : HUGO BOSS Vz: : : : : : : L&S: : 14:26: : 38,94: : 38,98: : +0,02: : : 0,05%: :
 : : : : HypoVereinsbk.: : : : : : : L&S: : 14:26: : 33,22: : 33,25: : -0,20: : : -0,58%: :
 : : : : IKB: : : : : : : L&S: : 14:23: : 29,81: : 29,84: : +0,29: : : 0,96%: :
 : : : : IVG Immobilien: : : : : : : L&S: : 14:29: : 33,89: : 33,91: : -0,35: : : -1,02%: :
 : : : : IWKA: : : : : : : L&S: : 14:26: : 19,41: : 19,43: : -0,03: : : -0,15%: :
 : : : : KarstadtQuelle: : : : : : : L&S: : 14:23: : 21,91: : 21,93: : -0,01: : : -0,05%: :
 : : : : Krones: : : : : : : L&S: : 14:29: : 122,42: : 122,88: : -0,37: : : -0,30%: :
 : : : : K+S : : : : : : : L&S: : 14:29: : 80,99: : 81,05: : -0,97: : : -1,18%: :
 : : : : Lanxess AG: : : : : : : L&S: : 14:23: : 41,68: : 41,71: : -0,46: : : -1,08%: :
 : : : : Leoni: : : : : : : L&S: : 14:29: : 30,76: : 30,77: : -0,15: : : -0,47%: :
 : : : : Merck: : : : : : : L&S: : 14:29: : 80,09: : 80,10: : +0,22: : : 0,27%: :
 : : : : MLP: : : : : : : L&S: : 14:23: : 15,26: : 15,28: : +0,16: : : 1,06%: :
 : : : : Norddt.Affiner: : : : : : : L&S: : 14:26: : 21,76: : 21,77: : +0,03: : : 0,11%: :
 : : : : Pfleiderer: : : : : : : L&S: : 14:29: : 21,15: : 21,18: : +0,84: : : 4,11%: :
 : : : : ProSiebenSat1 : : : : : : : L&S: : 14:23: : 24,12: : 24,15: : +0,01: : : 0,02%: :
 : : : : Puma: : : : : : : L&S: : 14:29: : 299,52: : 299,80: : -0,76: : : -0,25%: :
 : : : : Rheinmetall St: : : : : : : L&S: : 14:29: : 58,89: : 58,92: : +0,97: : : 1,67%: :
 : : : : Rhön-Klinik St: : : : : : : L&S: : 14:29: : 36,46: : 36,48: : +0,37: : : 1,02%: :
 : : : : Salzgitter: : : : : : : L&S: : 14:29: : 99,80: : 99,81: : -1,77: : : -1,74%: :
 : : : : Schwarz Pharma: : : : : : : L&S: : 14:29: : 98,85: : 98,91: : +0,41: : : 0,42%: :
 : : : : SGL CARBON: : : : : : : L&S: : 14:20: : 19,62: : 19,63: : +0,14: : : 0,69%: :
 : : : : STADA St: : : : : : : L&S: : 14:29: : 43,17: : 43,19: : -0,68: : : -1,55%: :
 : : : : Südzucker St: : : : : : : L&S: : 14:17: : 18,75: : 18,76: : +0,16: : : 0,83%: :
 : : : : techem: : : : : : : L&S: : 14:23: : 56,00: : 56,03: : +0,13: : : 0,22%: :
 : : : : Vossloh: : : : : : : L&S: : 14:29: : 57,56: : 57,76: : -0,57: : : -0,98%: :


Das Problem ist dort die Einheitlichkeit der Daten.
Deutsche Börse deutsche-boerse.com/...glich&expand=2.1 hat die Tabelle auch nicht immer gleich statt tabelle 49 wird es jetzt Tabelle 58.
Deshalb ist die Suche nach Eindeutigen Suchbegriffen einfacher.

Gruss Horst
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 16:11 
hier das Programm:
ausblenden volle Höhe 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:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ScktComp;

type
  TForm1 = class(TForm)
    ClientSocket1: TClientSocket;
    Edit1: TEdit;
    Button1: TButton;
    Memo1: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}
function DownloadFile(strHost, strRemoteFileName, strLocalFileName: string;
 ClientSocket: TClientSocket):string;
var
  intReturnCode,i: Integer;
  s: string;
  test:string;
  szBuffer: array[0..128of Char;
  FileOut: TFileStream;
begin
  if strRemoteFileName[1] <> '/' then
    strRemoteFileName := '/' + strRemoteFileName;

  FileOut := TFileStream.Create(strLocalFileName, fmCreate);
  try
    with ClientSocket do
    begin
      Host := strHost;
      ClientType := ctBlocking;
      Port := 80;

      try
        Open;
        {send query}
        s := 'GET ' + strRemoteFileName + '   HTTP/1.0'#13#10 +
             'Host: ' + strHost + #13#10#13#10;
        intReturnCode := Socket.SendBuf(Pointer(s)^, Length(s));

        if intReturnCode > 0 then
        begin
          {receive the answer}
          { iterate until no more data }
          while (intReturnCode > 0do
          begin
            { clear buffer before each iteration }
            FillChar(szBuffer, SizeOf(szBuffer), 0);

            { try to receive some data }
            intReturnCode := Socket.ReceiveBuf(szBuffer, SizeOf(szBuffer));

            { if received a some data, then add this data to the result string }
            if intReturnCode > 0 then
              FileOut.Write(szBuffer, intReturnCode);
            for i:=0 to 128 do test:=test+szbuffer[i];
          end
        end
        else
          MessageDlg('No answer from server', mtError, [mbOk], 0);

        Close;
      except
        MessageDlg('No connection', mtError, [mbOk], 0);
      end;
    end;
  finally
    FileOut.Free
  end;
  DownloadFile:=test;
end;

procedure TForm1.Button1Click(Sender: TObject);
  var p: Integer; s,Dokument,Host,test: String;
begin
  s:= Edit1.Text;
  if UpperCase(Copy(s, 14)) = 'HTTP' then begin
    Delete(s, 17); { http:// löschen }
    p:= Pos('/', s);
    if p = 0 then begin
      Host:= s;
      Dokument:= '/';
      end
    else begin
      Host:= Copy(s, 1, p - 1);
      Dokument:= Copy(s, p, Length(s));
    end;
    end;
  test:=DownloadFile(Host, '/'+Dokument, GetCurrentDir+Dokument, ClientSocket1);
  Memo1.Lines.clear();
  memo1.Lines.Add(test);
  //Memo1.Lines.LoadFromFile(GetCurrentDir+Dokument);
  edit1.text:='FERTIG';
end;

end.

im anhang das ganze ding gepackt...wer will oder es braucht

EDIT: mit dieser ämnderung gehts doch mit dem String:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
  test:=DownloadFile(Host, '/'+Dokument, GetCurrentDir+Dokument, ClientSocket1);
  Memo1.Lines.LoadFromFile(GetCurrentDir+Dokument);
  test:='';
  for i:=0 to Memo1.Lines.Count do test:=test+memo1.lines[i];
  Memo1.Lines.clear();
  memo1.Lines.Add(test);
  edit1.text:='FERTIG';


fehlt nur noch eine einfach möglichkeit zu zergliederung...
Einloggen, um Attachments anzusehen!
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 03.01.07 16:29 
Hallo,

etwas merkwürdig:
ausblenden Delphi-Quelltext
1:
2:
memo1.Lines.text:=DownloadFile(Host, '/'+Dokument, GetCurrentDir+Dokument, ClientSocket1); 
edit1.text:='FERTIG';

reicht schon.

Gruß Horst
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 17:08 
ist egal...ich wollte ja die stringverträglichkeit testen

ICh brauche immer noch eine Suchfunktion dafür
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 03.01.07 17:27 
Hallo,

wie schon geschrieben mit
ausblenden 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:
24:
25:
const
  conNamSuch = '/cmp_real.php?sec_id='//leicher änderbar oder in INI-Datei
  conBidSuch = 'class=t10r>';
  conAskSuch = conBidSuch;
  conTagStart = '<';
  conTagEnde  = '>';

var
  NeuePos: integer;
...
//Erster Name aus der Tabelle finden
NeuePos:=PosEx(conNamSuch,test,1);
while NeuePos > 0 do
  begin
  //folgendes Tag-Ende suchen das nicht direkt von einem TagStart gefolgt wird
  //funktioniert nur, weil hier alles in einer Zeile
  repeat
    NeuePos:=PosEx(conTagEnde,test,NeuePos+1);
  until test[NeuePos+1] <> conTagStart;
  MerkePos := NeuePos+1;
  NeuePos:=PosEx(conTagStart,test,MerkePos);
  strName := Copy(test,MerkePos,NeuePos-MerkePos{+1 ?});

  //Bid,Ask analog
  end;


Gruß Horst
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Mi 03.01.07 18:00 
Kannst du das ganze als Delphi-Porjekt mit (Statischem) text machen? eine Ausgabe der ersten name,bid,ask reicht...
ich hab trotzdem noch probleme es ganz zu verstehn
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Mi 03.01.07 19:32 
Hallo,

ich habe deinen link mal aufgerufen und als Datei 'Quartal Flife Magazine' in eigene Dateien gespeichert.

Sieh mal was Du damit anfangen kannst.

Gruß Horst
Einloggen, um Attachments anzusehen!
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19326
Erhaltene Danke: 1749

W11 x64 (Chrome, Edge)
Delphi 12 Pro, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Mi 03.01.07 20:05 
Ich hab mal die Einbindung einer kostenlosen Parser-Unit, wie ich sie für eines meiner Programme gebraucht habe, ein wenig gekürzt und in ein neues Projekt geschrieben.

Für den Download benutze ich Indy, weil ich das etwas einfacher finde. Allerdings bläht es die Exe etwas auf, du kannst ja ggf. auf deinen Code umstellen. ;-)
Einloggen, um Attachments anzusehen!
Flamefire Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1207
Erhaltene Danke: 31

Win 10
Delphi 2009 Pro, C++ (Visual Studio)
BeitragVerfasst: Di 09.01.07 13:07 
Hallo,
hab mir das von horst mal angesehn. Funktioniert! nja fast
1.) hab die Suchzeichen angepasst (sehr gut gemacht! danke Horst)
2.) Hab delphi 5-->Kein PosEx-->Mit ASM ersetzt
3.) Er findet den Namen nicht. Er zeigt nur die Börse (XET an)

Kannst du mir nen Hinweis geben/Umschreiben dass er den Namen und die Adresse im Link findet? Also "Man St" und "cmp_c.php?sec_id=1000059533&cmp_id=1000004267&qot_id=1022959721"
EDIT: Hab den Namen. Was jetzt noch fehlt ist der Link.
Einloggen, um Attachments anzusehen!
Horst_H
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 1654
Erhaltene Danke: 244

WIN10,PuppyLinux
FreePascal,Lazarus
BeitragVerfasst: Di 09.01.07 14:17 
Hallo,

Du musst schon eindeutig suchen.
'class=kl12l>' und 'class=kl22l>' stehen vor den Namen, weil die Tabelle auch unterschiedlich in den Zeilen eingefärbt ist, das ist nun einmal nicht eindeutig :-( .
Da ist der Parser von jaenicke doch besser geeignet, da Du auch die Links haben willst.

Gruss Horst