Reputation: 777
I'm parsing html page that uses javascript function call to show data. I need that data, I know how to parse the page to get function body, but the question is how to call that function from my java program to receive the same data function returns when is called on the site?
EDIT: the concrete web page is http://hedonism.co.uk/wines/, function to display wines is called getWines(), I need all wines info.
Upvotes: 1
Views: 114
Reputation: 4342
Looks like you have similar problem
One of the solutions is to use Selenium to record web page interaction scenario and use that scenario from java
Upvotes: 0
Reputation: 5622
Just simply running the JavaScript code on that webpage is not going to cut it, you will have to simulate a browser environment to get reliable results. I suggest you take a look at the list in the correct answer to "automation - headless internet browser" for inspiration.
Upvotes: 2