java - How to get values from an dynamic html page? -


i have old java program used data html page, worked fines few years ago, when run it, there no data. page link :

http://www.batstrading.com/book/ibm/

i can still see html table got java program, there no data, if use browser page, can see data dynamically changing, why ?

the html text java program page text can see browser's view source, looks :

    <tbody>       <tr>         <td class="shares">&nbsp;</td>         <td class="price">&nbsp;</td>       </tr> 

instead of data, showing &nbsp;

how fix code data ? mean : there nothing wrong java program, it's getting text browser's view source, don't see data, because page dynamic, how use java data dynamic page question.

scrap current approach since site updated via javascript. won't able download html , make work.

however, easier approach (than using selenium or js engine) request source data javascript using update page:

http://www.batstrading.com/json/bzx/book/ibm 

it's valid json. request link http client , parse json using jackson. yield reliable results.

disclaimer need make sure doing complies terms of service on website using. otherwise subject legal issues.


Comments