Hello. I am writing a parser for issuing Gosha and I am faced with a certain problem. I need to get links to the site from the found page, i.e. send request:
http://www.google.com/search?q=+edit1.text
And I get the html code page code code:
Source:= IdHTTP1.Get('http://www.google.com/search?q='+edit1.text);
Then I find all the links from the page with the following code Code:
while Pos('href="', Source) <> 0 do begin Delete(Source, 1, Pos('href="', Source) + Length('href="') - 1); ListBox1.Items.Add(Copy(Source, 1, Pos('"', Source) - 1)); Application.ProcessMessages; end;
All this devil-machine works, but I get links in the form of a redirect, but I would like it to be direct links. I saw in some prog such an execution, but I did not find the source code