NSE Website blocked

Hi all,

I was working on some python coding and kind of getting data from NSE fine for a few days. But suddenly NSE Website throws 503 error and I get access denied now even from the browser and ofcourse blocked in Python as well. Is there a way that we can resolve this issue?

You just need to pass the user-agent header and it should work. Some websites look at the header to check if it is a browser or bot.

import requests

headers = {
	'user-agent': 'Mozilla/5.0'
}

response = requests.get(WHATEVER_NSE_URL, headers=headers)

Your IP must have been blocked for fetching too many pages