swapniljariwala / nsepy

Python Library to get publicly available data on NSE website ie. stock quotes, historical data, live indices
https://nsepy-xyz.web.app
Other
758 stars 377 forks source link

TooManyRedirects: Exceeded 30 redirects. #248

Open venkatanagasai6 opened 1 year ago

venkatanagasai6 commented 1 year ago

TooManyRedirects Traceback (most recent call last) in <cell line: 1>() ----> 1 get_history(symbol="SBIN", start=date(2015,1,1), end=date(2015,1,31))

8 frames /usr/local/lib/python3.9/dist-packages/requests/sessions.py in resolve_redirects(self, resp, req, stream, timeout, verify, cert, proxies, yield_requests, **adapter_kwargs) 164 165 if len(resp.history) >= self.max_redirects: --> 166 raise TooManyRedirects('Exceeded {} redirects.'.format(self.max_redirects), response=resp) 167 168 # Release the connection back into the pool.

TooManyRedirects: Exceeded 30 redirects.

vishaln90 commented 1 year ago

Receiving the same issue since last few days

anantawasthi commented 1 year ago

++

kumarudhayac commented 1 year ago

same issue don't know how to overcome kindly resolve as soon as possible

VipulKavar commented 1 year ago

My script

abc = get_history(symbol='reliance', start=start_date, end=end_date) print(abc)

Result are in Screenshot

Screenshot (58)

marc-odp commented 1 year ago

Read other posts

gauravdattjoshi commented 1 year ago

It's mainly because the package uses NSE's old website URLs. However, those URLs no longer work as the NSE website got updated. It will take time for this issue to be resolved.

marc-odp commented 1 year ago

New website URL : https://www.niftyindices.com/reports/historical-data

tarunteckedge commented 1 year ago

any workaround for this?

venkatanagasai6 commented 1 year ago

any workaround for this?

We do have some other packages like yfinance as an alternative

alloc7260 commented 1 year ago

Use this insted : NSE-HISTORY-SCRAPER

pratik141 commented 1 year ago

created a new project for New NSE API

https://github.com/pratik141/nsedt

Soon add other APIs also