Another Bhavcopy Downloader (ABCD)

sr114

Well-Known Member
Using this to get teh zip file from NSE
myURL = paste("httpS://www.nseindia.com/content/historical/EQUITIES/", as.character(myDate, "%Y"), "/", toupper(as.character(myDate, "%b")), "/", downloadfilename, ".zip", sep = "")

GET(myURL, user_agent("Mozilla/5.0"), write_disk(paste(downloadfilename,".zip",sep="")))

and the response is:
Response [httpS://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip]
Date: 2019-01-03 14:24
Status: 403
Content-Type: text/html
Size: 354 B
<ON DISK> D:\eq\cm01JAN2019bhav.csv.zip
size = 1 Kb and the zip cannot be opened after downloading. the zip is downloaded via a script

Conclusion - NSE prevents us from accessing the zip file via downloader. so the solution is to download the zip and transform it in offline mode
 
Last edited:

kaly422000

Well-Known Member
Using this to get teh zip file from NSE
myURL = paste("httpS://www.nseindia.com/content/historical/EQUITIES/", as.character(myDate, "%Y"), "/", toupper(as.character(myDate, "%b")), "/", downloadfilename, ".zip", sep = "")

GET(myURL, user_agent("Mozilla/5.0"), write_disk(paste(downloadfilename,".zip",sep="")))

and the response is:
Response [httpS://www.nseindia.com/content/historical/EQUITIES/2019/JAN/cm01JAN2019bhav.csv.zip]
Date: 2019-01-03 14:24
Status: 403
Content-Type: text/html
Size: 354 B
<ON DISK> D:\eq\cm01JAN2019bhav.csv.zip
size = 1 Kb and the zip cannot be opened after downloading. the zip is downloaded via a script

Conclusion - NSE prevents us from accessing the zip file via downloader. so the solution is to download the zip and transform it in offline mode
but getbhavcopy is working
 

sr114

Well-Known Member
Getbhavcopy for BSE is not working - index dnld is showing this

"The remote server returned an error: (301) Moved Permanently Redirect."
 

VJAY

Well-Known Member

josh1

Well-Known Member
I haven't tested BSE but NSE has been fixed today and its working fine.

Read the prior posts for info.
BSE is not working for last 2 week - getbhavcopy cant dnld BSE last 2 week

tia
Subroto, Travi is talking about ABCD. It is downloading BSE since last week and Cash NSE since Yesterday.
If you want to your R script, you will have to give referer. See his earlier posts.
 

Similar threads