0

Using Java in Eclipse IDE, I want to extract the "Date of Listing" information (bottom left box under "Company Information") from an NSE Market Tracker webpage and save it to a text file.

For example, take the following webpage: https://www.nseindia.com/companytracker/cmtracker.jsp?symbol=TCS&cName=cmtracker_nsedef.css

I want to read "25-Aug-2004" (Date of Listing) and save the date to a text file.

How do I code this?

I tried using the FileUtils.copyURLToFile(url, file) function but the Date of Listing and other company information within the same box do not get copied; they do not appear in the HTML source code.

I don't have any experience working with HTML/JavaScript, so please pardon my ignorance on that front.

Artem Sokolov
  • 13,196
  • 4
  • 43
  • 74
Vebby
  • 99
  • 1
  • 6
  • If you inspect all the web traffic in your browser using developer console, you will notice that the information that you are looking for (Listing year) is a part of "Company Info" and it is being fetched by this resource : https://www.nseindia.com/marketinfo/companyTracker/compInfo.jsp?symbol=TCS&series=EQ. And then you may also find this useful https://stackoverflow.com/questions/5769717/how-can-i-get-an-http-response-body-as-a-string-in-java – Kishore Kirdat Jul 12 '19 at 15:37
  • Got it! Thank you very much! – Vebby Jul 12 '19 at 16:15

0 Answers0