Jayyrus
Jayyrus

Reputation: 13051

How to get, in java, the entire html of a page loaded in part from jquery

i need to develope a web application that allows me to scrape a page that is load partially using jquery. i learn that in php this is not possible writing this post

I read about rhino, but i don't know how to use that for my scope, does someone know how to do that in java? is possible to have some example? thanks!!!!

Upvotes: 3

Views: 970

Answers (1)

leifg
leifg

Reputation: 8988

What you are looking for is a browser interface.

The most commonly used browser interface (or driver) is selenium: http://seleniumhq.org/docs/03_webdriver.html#introducing-the-selenium-webdriver-api-by-example

You can use selenium to open a browser of your choice to open the website. It has javascript support, so you'll be able to traverse the DOM via XPath or CSS selectors.

Upvotes: 2

Related Questions