| Posted on November 3, 2010 at 10:37 PM |
Looks like NSE has got smart and has enabled some additional checks that is blocking Getbhavcopy from downloading the files.
Right now i dont know what needs to be done to fix this. I am working on this. I will keep updating this blog post to keep everyone appraised about the progress.
Thanks for bearing with me.
Updates also on my https://twitter.com/getbhavcopy" target="_blank">Twitter page. Follow me to keep track of the progress.
Update 1: 4 Nov 2010, 1:38 AM PST : Hemen
I tried spending about 4 hours trying to understand how the NSE server is able to differentiate between the requests sent by Browser from those sent by Getbhavcopy. As of now I have not been able to resolve it. Will continue investigating tomorrow.
Update 2: 4 Nov 2010, 11:59 AM PST : Hemen
Testman suggested the following fix.
Hi Hemen,Add following to your http request headers:Referer: http://www.nseindia.com/archives/archives.htmUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 (.NET CLR 3.5.30729)Give 15 seconds gap between two requests.Hope it helps
I will try to code this tonight and report if this fixes the issue.
Update 3: 6 Nov 2010, 02:05 AM PST : Hemen
Good news for all you getbhavcopy fans. The 403 Forbidden error has been fixed. Here is the proof

It is almost 2 in the morning and tomorrow need to get up early for Diwali New Year. So will be going off to bed.
I will release 2.1.1a (Alpha release) tomorrow as I need to clean up some code.
Update 4 : 6 Nov 2010 03:04 AM PST: Hemen
Could not wait till tomorrow to release it. So releasing it now itself. 2.1.1a version is availabe for you on the Downloads Page.
It fixes the 403 Forbidden error and Getbhavcopy is working again !!
Wish you all a happy Diwali.
Categories: None
The words you entered did not match the given text. Please try again.
BIJOY says...
data down loader of joy is somewhat able to download eod datas..volumediggers.com is the site.But we love getbhavcopy by hemen..we are used to it.Hemen when datadownloader is capable of downloading why getbhavcopy is forbidden...plzz sort out the problem.Bijoy
murthymsr says...
Dear Hemen,
I was trying to understand the reasons behind the changes made by NSE resulting in the failure of DD to function normally and the type of modifications required to be done to
Downloaders to bring them back on track.
Looks like that NSE does not want to allow data downloads through SW, but wants to allow through browser only. This may be because the load on their servers is increasing
particularly during market hours.
Code in all downloaders, one by one, will be modified to imitate the browser request and downloaders will start function as before and load on NSE servers will reach the
previous valus and NSE may start looking out for other ways to prevent sw downloads.
It is unfortunate that NSE could have augmented their server capacity instead of restricting sw downloads.
Now to help NSE to reduce the load on their servers during market hours and to serve as a back-up plan, I wish;
1) More than one day downloads through DD may be restricted to off market hours.
2) Any time NSE makes some changes at their end, all users are effected and developers are to work on emergency to mitigate the sufferings of users. To reduce the pain to both,
I wish that:
GBC may have another offline mode in addition to the present online mode.
In the offline mode, it will work on the EOD zip files manually downloaded by user and saved in the specified folder and rest of the functioning is normal.
Even if there are any changes at NSE end, the SW will work in offline mode, as long as NSE allows manual downloads, which anyway, it is obliged to do to the trader / investor
base.
Solicit your response on my musings at a later date when the present emergency is over.
Regards.
murthymsr
Hemen says...
Hi kkseal,
You are on the right track. i already tried that. did not work. :-(
Hi Khokho,
This is a general change by NSE i believe,
Oops!
Oops, you forgot something.