Topic: [Solved] - HTTPGet - question for Dmitry
Hello Dmitry and all MVD fans,
As you may know, I've oriented my developments on systems aiming at scraping info from webpages. I use a lot of HTTPGet to retrieve web page source code and parse it looking for specific infos.
From time to time, I launch a "batch" check on pages (sometimes more than 20.000 URLs) and, when an error occurs, I get a DLGmessage from the system with the 404 error. The problem is that, when this occurs during a big loop (checking urls after urls), the system halts until I click on the OK button. And if I'm not behind the screen, we'll... the system waits for me.
My first question is : is there a way to avoid that message or, close it automatically after a certain amount of time for example ?
Second question : I assume you're using Indy HTTP. If this is correct, could you let us manage the exception ?
I' d like to do something like :
try
Source := HTTPGet(URL);
<some parsing code>
Except
On E: Exception do
Begin
Form1.Memo1.Lines.Add(E.Message);
End;
End;
I hope I was clear enough for you to understand my question.
Wish you all a good day
Cheers
Mathias
Each time I get a divorce, I keep the house
Zaza Gabor