I need to download historical data from a website (https://www.nseindia.com/products/content/equities/equities/archieve_eq.htm). It is possible to manually download data by selecting each date and then clicking on download but it seems a very tiring and time consuming job.
On the above link, I need to download (Bhavcopy (PR.zip)) for all dates. Here is what I have found out. Let us say I select (Bhavcopy PR.zip)) and date as 15-05-2012, then the link for downloading file is https://www.nseindia.com/archives/equities/bhavcopy/pr/PR150512.zip .
Now, if I simply change the date in the link to 160512 i.e. https://www.nseindia.com/archives/equities/bhavcopy/pr/PR160512.zip and paste it in the address bar, then I can get data for 16-05-12.
So it seems there are two ways to get all the zip files which I need:
1) Download all contents of folder https://www.nseindia.com/archives/equities/bhavcopy/pr/
2) Write a loop which generates all dates and get data for each date through the links generated by the loop.
Please help with either of the way above. I have very little experience of scripting and I am using Windows machine. Any code or link to code will be very useful in achieving my goal.
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 203
تاريخ: سه
شنبه
4 خرداد
1395 ساعت: 12:44