Currently, I am engaged in content parsing and have successfully executed a sample program. To demonstrate, I have utilized a mock link which you can access below:
Alternatively, you can click on this link:
Click Here
In the provided link, I have parsed table data and stored it in a Java object.
Note that BSE and NSE do not align with my specific requirements, they simply serve as examples. The tables within the link lack unique identifiers such as IDs or classes. In order to parse the data effectively, I have employed XPath.
This is the XPath I'm using:
/html/body/table[4]/tbody/tr/td/table[2]/tbody/tr[2]/td[2]/font/table[2]
While the current setup works well for now, future changes to the website's structure may render my program ineffective. Please advise if there are alternative methods to dynamically parse and store data in a database, ensuring results display correctly even if the webpage structure evolves. Currently, I rely on the JSOUP API for this task. Any recommendations for other APIs that offer robust support for similar requirements?