0

I'm trying to get data from a website:

http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do?metodo=listarMesesChuvasMensais (translated via Google Translate)

In Delphi I know working with XML based Webservices (SOAP, WSDL), but this site does not provide such kind of services.

But I do not have knowledge in languages ​​like PHP and HTML, not even web languages ​​in general.

My question is, is there any way to get data from that site with the knowledge I do (not) have? Is there a tool to do this in Delphi? What are the common first steps to study the ability to do this?

Input January and 2014:

http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do?metodo=listarMesesChuvasMensais

Output:

a generic method url

http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do

Artur_Indio
  • 736
  • 18
  • 35
  • http://stackoverflow.com/questions/9239267/how-to-download-a-web-page-into-a-variable – Royal Bg Jul 15 '14 at 08:46
  • 1
    Delphi is probably the wrong tool for the job – David Heffernan Jul 15 '14 at 08:49
  • It's just a static table which you can parse e.g. with MSHTML. – TLama Jul 15 '14 at 08:51
  • @TLama like in this [question](http://stackoverflow.com/questions/14348346/html-tag-parsing)? – Artur_Indio Jul 15 '14 at 09:05
  • Yup, similarly. But I'd prefer access through one of the `IHTMLTable` interfaces. Try to search something related to `IHTMLTable`. – TLama Jul 15 '14 at 09:10
  • Have you considered using the standard URLDownloadToFile() routine and then parsing the file yourself? – MartynA Jul 15 '14 at 11:44
  • @MartynA the problem is my [website](http://site2.aesa.pb.gov.br/aesa/monitoramentoPluviometria.do?metodo=listarMesesChuvasMensais) do not return nothing. I have to save page in html (using the Chrome) and after parsing the file. I'm trying follow the (at)mjn steps. – Artur_Indio Jul 16 '14 at 08:46

1 Answers1

1

First you need to use a HTTP client such as Internet Direct (Indy) or Synapse to get the web page as text. Then you can either a HTML parser library or plain string routines to extract the table data.

How to perform HTTP requests is shown in many articles and Stackoverflow questions.

mjn
  • 36,362
  • 28
  • 176
  • 378