You can use TWebBrowser component for that. It's a wrapper to Internet
Explorer. After you redirect the TWebBrowser to the url, you can get the HTML
(after been rendered) using this code:
function WB_GetHTMLCode(WebBrowser: TWebBrowser; ACode: TStrings): Boolean;
var
ps: IPersistStreamInit;
ss: TStringStream;
sa: IStream;
s: string;
begin
ps := WebBrowser.Document as IPersistStreamInit;
s := '';
ss := TStringStream.Create(s);
try
sa := TStreamAdapter.Create(ss, soReference) as IStream;
Result := Succeeded(ps.Save(sa, True));
if Result then ACode.Add(ss.Datastring);
finally
ss.Free;
end;
end;
Regards,
Luthfi
--- On Fri, 4/23/10, Rainer von Saleski <[email protected]> wrote:
> From: Rainer von Saleski <[email protected]>
> Subject: Retrieving a rendered internet page
> To: [email protected]
> Date: Friday, April 23, 2010, 9:35 AM
> Hi,
>
> I pull information from a commercial web site with my
> program. Unfortunately, the site changed its structure
> and no longer delivers its information in the html
> code. Instead, it sends Javascript code which creates
> the viewed page using document.write.
>
> So I can no longer get the data simply using Indy and
> HTTP.Get.
>
> What I need is something like a full browser rendering
> engine built into Delphi, and access to the generated
> display.
>
> Any suggestions?
>
> Thanks,
> Rainer
_______________________________________________
Delphi mailing list
[email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi