jakubpluta / pyetf Goto Github PK
View Code? Open in Web Editor NEWScrape ETF data from etfdb
License: MIT License
Scrape ETF data from etfdb
License: MIT License
I converted the results to a dictionary like this
dvwo=vwo.to_dict()
I am able to access data from various keys of the dict i.e.
#print(dvwo.keys())
#['Dividends', 'Exposure', 'Holdings', 'Info', 'Performance', 'Ratings', 'Technicals', 'Volatility']
However print(dvwo['Volatility']) always returns {} regardless of the symbol. I noticed the HTML has this tagged as a new table i.e.
- which may have broken the parsing logic.~R
No such file or directory: '/Users/...../miniforge3/lib/python3.10/site-packages/pyetf/data/etfdb.json'
For all the etf's the info is None
vwo = etfdb.load_etf('VWO')
print(vwo.info) # None
Just running ETF("SPY")
results in the following traceback;
Traceback (most recent call last):
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 85, in create_connection
raise err
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/util/connection.py", line 73, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 793, in urlopen
response = self._make_request(
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 491, in _make_request
raise new_e
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 467, in _make_request
self._validate_conn(conn)
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connectionpool.py", line 1099, in _validate_conn
conn.connect()
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 616, in connect
self.sock = sock = self._new_conn()
File "/home/nick/dev/trade-util-lib/.venv/lib/python3.10/site-packages/urllib3/connection.py", line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0x7fcacfea4430>: Failed to establish a new connection: [Errno 111] Connection refused
etfpy
importing fails due to missing requests
package.
After installing etfpy using pip install pyetf
and importing it import etfpy
I'm getting:
>>> import etfpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/local_path/pyetf/etfpy/__init__.py", line 3, in <module>
from etfpy.client.etf_client import get_available_etfs_list
File "/local_path/pyetf/etfpy/client/etf_client.py", line 11, in <module>
from etfpy.client._base_client import BaseClient
File "/local_path/pyetf/etfpy/client/_base_client.py", line 4, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
While PyPI shows version 1.0.0, this repo is at version 0.1.0 according to setup.py
and pyproject.toml
. Something's out of sync here.
Also, neither release (0.1.0 and 1.0.0) are tagged/marked as release here on GitHub.
Maybe you can shed some light on the versioning?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.