When requesting via GET, the google page request is not downloaded properly. That is, if I open the source code, there are links that I want to parse, and when I do it programmatically via Delphi 7, the Synapse or Indy component does not make a difference, I get the wrong result, that is, some other code, and there is no those links that I need.

Code :

procedure TForm1.Button1Click(Sender: TObject); var stroka: string; begin stroka := 'https://www.google.ru/?gfe_rd=cr&#q=button&start=20'; HttpGetText(stroka, mmo1.Lines); end; //нет ссылок в коде которые надо спарсить, но в исходном коде они есть 
  • There is a strong suspicion that the original link loads the page with a java-script, which already then loads the search results. Because if httpsend is simply loading the page by the address, then you get this original page with no results (links). I don’t see a simple solution here, unless I can find any API in Google that would display the search results in pure html. - Alekcvp

2 answers 2

Most likely you don’t transfer all HTTP headers as compared to your browser, the server analyzes them and as a result gives a more suitable answer (as an option, the answer is not for a Russian user, but for an English user).

Open the browser console on the Network page and see what it sends to the server. Pay particular attention to the following HTTP headers: Set-Cookie , Accept-Language , Content-Type , User-Agent .

    This is Google’s way to circumvent parrot robots. They will always fight it.