Another Bhavcopy Downloader (ABCD)

travi

Well-Known Member
NSE server is denying direct access from application. I am looking for solution.

Until then-
Download ABCD.r into ABCD folder.
Download bhavcopy from NSE site into NSE folder and run ABCD for the date.
ABCD will process zip file into proper format.
Hey buddies. Good to see that you have done basic investigation before writing here. I get irritated when somebody just says ABCD is not working.
NSE has followed BSE and shifted to Secured http(https:) from http. I will have to change the code for downloading. Give me some time.
the http to https change was done some time ago. i'd posted here and it was working fine.

In the recent case, the URL is the same fired from browser or ABCD but the ABCD one seems to be denied access. One very peculiar thing to note is that queries on NSE EQ for 31st Dec are still working whereas the Jan 2019 are not.

Could this be a case of multi internal servers where query is forwarded and the new server being configured slightly different. Its checking for User-Agent or something else in the Http Header request?

Will try and check that, first testing with CURL.
 

travi

Well-Known Member
@josh1 bhai I think I got it.
It is missing a referrer, that is it wants you to go to its parent page first, then download link.

Following is now working.

Code:
curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" -e https://www.nseindia.com/products/content/equities/equities/homepage_eq.htm --url https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm02JAN2019bhav.csv.zip -o cm02JAN2019bhav.csv.zip
Just need to add it in .r file.

CURL works even without the -H option but -e is mandatory.
 

kaly422000

Well-Known Member
NSE server is denying direct access from application. I am looking for solution.

Until then-
Download ABCD.r into ABCD folder.
Download bhavcopy from NSE site into NSE folder and run ABCD for the date.
ABCD will process zip file into proper format.
CASH BHAVCOPY IS DOWNLOADING AS PER UR INSTRUCTION. THANX VERY MUCH. BUT WITH SAME PROCESS FUTURE BHAVCOPY NOT DOWNLOADING. ANY WAY EXPECT THAT U WILL UPDATE ABCD . PLS HAVE A HELP FILE TO UNDERSTAND NSE FUTURE SCRIPS, HOW TO RENAME ATLEAST. ANY WAY UR TOOL IS VERY USEFULL FOR US .
 

travi

Well-Known Member
CASH BHAVCOPY IS DOWNLOADING AS PER UR INSTRUCTION. THANX VERY MUCH. BUT WITH SAME PROCESS FUTURE BHAVCOPY NOT DOWNLOADING. ANY WAY EXPECT THAT U WILL UPDATE ABCD . PLS HAVE A HELP FILE TO UNDERSTAND NSE FUTURE SCRIPS, HOW TO RENAME ATLEAST. ANY WAY UR TOOL IS VERY USEFULL FOR US .
be patient bhai :D
many are working on fixing it.
 

josh1

Well-Known Member
CASH BHAVCOPY IS DOWNLOADING AS PER UR INSTRUCTION. THANX VERY MUCH. BUT WITH SAME PROCESS FUTURE BHAVCOPY NOT DOWNLOADING. ANY WAY EXPECT THAT U WILL UPDATE ABCD . PLS HAVE A HELP FILE TO UNDERSTAND NSE FUTURE SCRIPS, HOW TO RENAME ATLEAST. ANY WAY UR TOOL IS VERY USEFULL FOR US .
be patient bhai :D
many are working on fixing it.
Download ABCD.r from Dropbox. It has started downloading Cash Bhavcopy. OI and Futures will be done as soon as I get time.
Thanks Trovi for your work.
 

kaly422000

Well-Known Member
@josh1 bhai I think I got it.
It is missing a referrer, that is it wants you to go to its parent page first, then download link.

Following is now working.

Code:
curl -H "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.89 Safari/537.36" -e https://www.nseindia.com/products/content/equities/equities/homepage_eq.htm --url https://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm02JAN2019bhav.csv.zip -o cm02JAN2019bhav.csv.zip
Just need to add it in .r file.

CURL works even without the -H option but -e is mandatory.
how to enter this code. copy and paste in last line in ABCD.r folder?
 

travi

Well-Known Member
how to enter this code. copy and paste in last line in ABCD.r folder?
Go to link in @josh1 signature and get everything from Dropbox. Backup your old folder..
Download files and run setup. CURL is an external program (command), you will need Curl.Exe file also from Dropbox.

Make sure all Curl is in the current working dir (or window path) so that it can be found.

This is not line in the ABCD.r file, lot of changes have been made.
 

Similar threads