Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to extract website Source code in Delphi

Tags:

delphi

I need a way to extract the website source code in Delphi and put it in a TStrings or TStringList

exactly the same way when you click on View Source in the Internet Explorer and it opens the notepad and shows the source code.

Maybe we can use TWebBrowser or I don't know Thank you.

like image 410
user1512094 Avatar asked Aug 20 '12 11:08

user1512094


1 Answers

Using Indy you can simply do

Strings.Text := IdHttp.Get(URL);

You really don't want to spin up a TWebBrowser for a simple HTTP GET.

like image 194
David Heffernan Avatar answered Sep 26 '22 13:09

David Heffernan