I am trying to get the top 10 stocks from fidelity website for a fund. There is a HTML element table with id="top-holdings-table". Why is that jsoup is not able to get hold of the table? How do I get hold of the rows in this table via jsoup?
String url = "https://www.fidelity.co.uk/factsheet-data/factsheet/GB00B784NS11-axa-framlington-biotech-fund-z-acc/portfolio";
org.jsoup.nodes.Document doc = null;
try {
doc = Jsoup.connect(url).get();
Elements rows = doc.select("table#top-holdings-table");
Elements tbody = rows.select("tbody");
Elements tr = tbody.select("tr");
System.out.println(tr);
} catch (IOException e) {
e.printStackTrace();
}