lundi 30 avril 2018

How to read with java web page content that is not included in the html source?

I used to use the following code to read http://piibel.net content with java:

String url = "http://piibel.net/?q=Ap%2015";
URL oracle = new URL(url);
BufferedReader in = new BufferedReader(new InputStreamReader(oracle.openStream(),"UTF-8"));
String inputLine;
LinkedList<String> alamvärsid = new LinkedList<String>();
while ((inputLine = in.readLine()) != null){
//do something
}

And it worked fine, but now they have changed something and the actual text that we read from that web page is "dynamic content" and you can no longer access it from the source code! But source code is the thing that java actually reads!

I tried to google this question, but people mostly ask only how to read the plain text of the web page without html tags. This is not my problem; I can work fine with the html source code. The problem is that the information I am looking for is not in the source code. I can see it in the "inspect element" function of Chrome and Firefox, but java does not reproduce that function for me.




Aucun commentaire:

Enregistrer un commentaire