التعامل مع اللست فيو
#8
للاسف انا مجربه قبل هذا لكن يعطيني نفس السطر الاول مكرر لذلك استعملت
for in loop المكافئة ل foreach ولكن لا جدوى انظر الصورة
http://up.dev-point.com/uploads1/f20026c975621.jpg

هذا الكود كامل

procedure TForm1.Button1Click(Sender: TObject);
var
Lst : TListItem;
http :TIdHTTP;
reg: IRegExp2;
MatchCollection: IMatchCollection2;
Match1: IMatch2;
match: ISubMatches;
txt Confusedtring;
i : integer;
begin
reg := CoRegExp.Create;
reg.Global := True;
reg.IgnoreCase:=true;
reg.Pattern := '<a class="internal-link" href="http://filehippo.com.*?title="([a-z0-9\s!.]+)">[\S\s]+?<img src="(.*?.png)"/>';
http:=TIdHTTP.Create(nil);
txt:= http.Get ('http://filehippo.com/fr/software/antimalware/');
http.Request.UserAgent:='Mozilla/5.0 (Windows NT 6.1; rv:48.0) Gecko/20100101 Firefox/48.0';
MatchCollection := reg.Execute(txt) as IMatchCollection2;

if MatchCollection.Count = 0 then exit;
Match1 := MatchCollection.Item[0] as IMatch2;
match := Match1.SubMatches as ISubMatches;
begin
begin
for i:=0 to Matchcollection.count-1 do
begin
lst:=listview1.Items.Add;;
lst.Caption:=match[0];
lst.SubItems.Add(match[1]);
end;
IdHTTP1.Free;
end;
end;
end;

end.
الرد


الردود في هذا الموضوع
التعامل مع اللست فيو - بواسطة mohamed49 - 22-12-2016, 12:36 PM
RE: التعامل مع اللست فيو - بواسطة rahiche - 23-12-2016, 06:16 PM
RE: التعامل مع اللست فيو - بواسطة mohamed49 - 23-12-2016, 06:56 PM
RE: التعامل مع اللست فيو - بواسطة rahiche - 23-12-2016, 10:00 PM
RE: التعامل مع اللست فيو - بواسطة mohamed49 - 24-12-2016, 07:41 AM
RE: التعامل مع اللست فيو - بواسطة mohamed49 - 25-12-2016, 07:59 AM
RE: التعامل مع اللست فيو - بواسطة mobile - 25-12-2016, 10:07 PM
RE: التعامل مع اللست فيو - بواسطة mohamed49 - 26-12-2016, 08:34 PM
RE: التعامل مع اللست فيو - بواسطة takaya5 - 20-03-2017, 09:36 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم