Files
stonks-oracle/scripts/check_edgar_urls.py
T
Celes Renata 5f6d23888a
ci/woodpecker/push/woodpecker Pipeline failed
Build and Push / lint-and-test (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.adapters.broker_adapter name:broker-adapter]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.aggregation.worker name:aggregation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.extractor.worker name:extractor]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.ingestion.worker name:ingestion]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.lake_publisher.worker name:lake-publisher]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.parser.worker name:parser]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.recommendation.worker name:recommendation]) (push) Has been cancelled
Build and Push / build-services (map[cmd:python -m services.scheduler.app name:scheduler]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.api.app:app --host 0.0.0.0 --port 8000 name:query-api]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 name:risk]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 name:symbol-registry]) (push) Has been cancelled
Build and Push / build-services (map[cmd:uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 name:trading-engine]) (push) Has been cancelled
Build and Push / build-dashboard (push) Has been cancelled
Build and Push / build-superset (push) Has been cancelled
Build and Push / integration-test (push) Has been cancelled
ci: fix lint errors across project, update ruff.toml per-file ignores
2026-04-18 21:02:28 +00:00

30 lines
1.1 KiB
Python

import json
import os
from minio import Minio
mc = Minio(os.environ["MINIO_ENDPOINT"], access_key=os.environ["MINIO_ACCESS_KEY"], secret_key=os.environ["MINIO_SECRET_KEY"], secure=False)
objs = list(mc.list_objects("stonks-raw-filings", recursive=True))
for obj in objs[:1]:
data = json.loads(mc.get_object("stonks-raw-filings", obj.object_name).read())
hits = data.get("hits", {}).get("hits", [])
for h in hits[:5]:
src = h.get("_source", {})
adsh = src.get("adsh", "")
ciks = src.get("ciks", [])
form = src.get("form", "")
names = src.get("display_names", [])
file_desc = src.get("file_description", "")
file_date = src.get("file_date", "")
file_type = src.get("file_type", "")
if adsh and ciks:
cik = ciks[0].lstrip("0")
adsh_nodash = adsh.replace("-", "")
url = f"https://www.sec.gov/Archives/edgar/data/{cik}/{adsh_nodash}/{adsh}-index.htm"
print(f"form={form} type={file_type} date={file_date}")
print(f" names={names}")
print(f" desc={file_desc}")
print(f" index_url={url}")
print()