JakubPluta / pyetf

Scrape ETF data from etfdb
MIT License
39 stars 10 forks source link

receiving 403: Forbidden error codes when trying to load etf #23

Open msmith6307 opened 2 months ago

msmith6307 commented 2 months ago

started receiving 403 errors over the last two days when trying to load etf data was previously working updated to etfpy 1.0.20 but still seeing the issue. using - Python 3.11.5

from etfpy import ETF, load_etf, get_available_etfs_list etfs = get_available_etfs_list() etfs [works did not copy output here] spy = ETF("SPY") Traceback (most recent call last): File "", line 1, in File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\etf.py", line 19, in init super().init(ticker) File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\client\etf_client.py", line 55, in init self._soup = self._make_soup_request() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\client\etf_client.py", line 84, in _make_soup_request raise Exception(f"response {response.status_code}: {response.reason}") Exception: response 403: Forbidden spy.info Traceback (most recent call last): File "", line 1, in NameError: name 'spy' is not defined vwo = load_etf('VWO') Traceback (most recent call last): File "", line 1, in File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\etf.py", line 353, in load_etf return ETF(etf) ^^^^^^^^ File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\etf.py", line 19, in init super().init(ticker) File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\client\etf_client.py", line 55, in init self._soup = self._make_soup_request() ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\msmit\anaconda3\Lib\site-packages\etfpy\client\etf_client.py", line 84, in _make_soup_request raise Exception(f"response {response.status_code}: {response.reason}") Exception: response 403: Forbidden

tavaskor commented 2 months ago

updated to etfpy 1.0.20 but still seeing the issue.

This issue also applies to other programmatic access to etfdb ; e.g., https://github.com/lvxhnat/pyetfdb-scraper

npreiser commented 1 month ago

same here , worked a about 10 days ago for me, bummer,

tchenard commented 1 month ago

Any update on this or know of a workaround? I am also getting the 403 Forbidden error

horlatunjiey commented 1 month ago

Has anyone found a solution to the 403: Forbidden error? I've been grappling with this challenge for over three weeks now.