0

I am developing an Android App. I´ve used Jsoup many times but in this case the result are empties. As I understand this happend because the web page use AJAX.

HOw can I get the results from tables of this page:

http://agencias.cat.webloteria.com.ar/#1

I am looking for the resuls on the Slide "Consultas". If I use this with Jsoup:

document = Jsoup.connect(url)
                    .userAgent("Mozilla/5.0 (windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0")
                    .timeout(44000)
                    .get();
  Elements matutina=document.select("#QuinielaExt01 > div");
   String result=matutina.text();

I receive a null or empty String

Any clue?

Agustin Scalisi
  • 551
  • 3
  • 17

1 Answers1

1

See my answer to this similar Stackoverflow question:

To summarize: that page's content is being loaded using Ajax through Javascript. Jsoup is not able to execute javascript, it is only able to parse the initial HTML that is sent back from the website.

If you need to access data that is loaded through Javascript, you will need to use a headless browser. See my previous answer.

Community
  • 1
  • 1
Vic Seedoubleyew
  • 9,888
  • 6
  • 55
  • 76