-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Hello 👋,
I'm using sec-edgar-downloader and would like to know if it's possible to directly download filings (e.g., 10-Q for AAPL) in HTML format without file access?
The workaround I'm using currently is:
from sec_downloader import Downloader
dl = Downloader("MyCompanyName", "[email protected]")
html = dl.get_latest_html("10-Q", "AAPL")
print(f"{html[:50]}...")<?xml version="1.0" ?><!--XBRL Document Created wi...
which is implemented as
# pip install sec-edgar-downloader sec-downloader
from sec_edgar_downloader import Downloader
from sec_downloader import DownloadStorage
ONLY_HTML = "**/*.htm*"
storage = DownloadStorage(filter_pattern=ONLY_HTML)
with storage as path:
dl = Downloader("MyCompanyName", "[email protected]", path)
dl.get("10-Q", "AAPL", limit=1, download_details=True)
# all files are now deleted and only stored in memory
content = storage.get_file_contents()[0].content
print(f"{content[:50]}...")<?xml version="1.0" ?><!--XBRL Document Created wi...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels