I also started getting this issue recently, it was working fine last month.
File "C:\Users\nb\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\sessions.py", line 166, in resolve_redirects
raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp)
requests.exceptions.TooManyRedirects: Exceeded 30 redirects.
Code:
bhav_copy = get_price_list(dt=last_trade_date)
#last_trade_date is as the name suggests
I also started getting this issue recently, it was working fine last month.
I found a solution but I think it has to be implemented in the code of NSEPY, here is the link:
https://stackoverflow.com/questions/23651947/python-requests-requests-exceptions-toomanyredirects-exceeded-30-redirects