NSE "Referral Denied" error... Plz help

#2
Since Sep 20, NSE does a referrer check. This resulted in breaking data fetchers (see here for an example).

A solution, in your case, is to add a spoofed referer in the header of the request. For the request that you mention, the referer could be:
Referer: http://nseindia.com/marketinfo/companyinfo/companysearch.jsp?cons=sbin&section=7

This change suffices to fetch the data and would be preferable to looking for alternatives to something that worked earlier. Exactly how that is done in Excel, or in the script that you use, is something I cannot help with.
 

Similar threads