0
Not able to extract data from a website using JSoup
here is the link of that website:- https://in.tradingview.com/symbols/AUDNZD/?exchange=FX after opening this you'll see a forex chart in which you'll see OANDA and its value. i want that value of OANDA. i tried many things but i wasn't able to get the data.
5 Answers
0
Looks like the website is loading in data with javascript. Jsoup is just an html parser and wont be able to get any data created by js. I'd recommend looking into capturing it via an automated browser such as selenium.
0
JME how selenium will be able to capture that... I checked network tab.. couldn't find anything.
0
Navigate to page with selenium.
Pause wait for js to load value.
Use selenium find element to select the element containing the value.
The get attribute innerhtml to get the actual value and the do whatever you want with it.
0
https://www.selenium.dev/documentation/en/
Should be able to figure it out with this.
I've seen other people use something called htmlunit to accomplish similar things but never tried myself.
0
Okayy... I'll try.