I'm trying to find a way to iterate through dates for a large period of time. The site is: https://www.nnbulgaria.com/life-insurance/insurance-plans/investment-insurance-nn-pro/value-of-investment-unit and there is a table in it with specific values for each date (begins on 06/01/2017, formated MM/DD/YYYY). With different date input the table changes, so I need to be able to loop through dates or a range of dates, and then extract the table data. (There is also a graph with all the values, but I can't find the dynamic content in the page source)
The scraped data may be formatted or not (it's on separate td tags), but I can reshape it once it's downloaded. So far I read about options with selenium, but I don't have Chrome installed, so I'm looking for other ways. Help is appreciated.
This page uses
JavaScript/AJAX(XHR)Using
DevToolinChromeofFirefox(tab:Network, filter:XHR) you can see all requests fromJavaScriptto server and all data in responses.This way you can see it reads some data from url:
https://www.nnbulgaria.com/Orchard.Nn/public/chartsUVData?chart-startdate=2004-06-01&chart-enddate=2020-04-23&value-per-share-type=LiPro
and it gets
JSONdata which you can easily convert to Python dictionary.In url you can see date
chart-startdate=andenddate=so if you change dates then you should get different data - and you don't need to usePOSTform for this.And it doesn't need to use
SeleniumResult