I have a HTML page like
<html>
<head>
<!-- necessary java scripts -->
</head>
<body>
<div id="content"></div>
</body>
Using the script, when the page renders, appropriate html content is placed withing the div element with id "content". So after the page renders there are a whole lot of html content withing div element.
Now i need to extract the dynamically rendered content within the div element using Java. Can anyone please suggest a way to do it?
The problem is that you need to evaluate script on the page in java. You need to get some web engine to do it. You can look here: Embedding Gecko/Webkit in Java And try to use webkit or gecko to load page. Then you can use some java library to parse html.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With