I built a free open source tool to track Nancy Pelosi's official stock trade reports
Описание и применение
Небольшой скрипт на Python автоматически скачивает и фильтрует отчёты о сделках Нэнси Пелоси, предоставляя обновлённый список PDF‑файлов без API‑ключей.
Задача
The public stock trade reports for Nancy Pelosi are scattered across yearly ZIP files and PDFs, making them hard to search.
Результат
The script provides a current, searchable list of Pelosi’s PTR filings without requiring API keys or external dependencies.
Рабочий процесс
- Download https://disclosures-clerk.house.gov/public_disc/financial-pdfs/{year}FD.zip
- Parse the XML and keep rows where FilingType == "P" and the name matches
- Build the link to the original PDF: .../ptr-pdfs/{year}/{doc_id}.pdf
- Output results in markdown or JSON
- GitHub Actions runs the script every Monday and commits updated FILINGS.md
Доказательства
The data is public, but it is spread over yearly index files and PDFs that are hard to search.
Under the STOCK Act (2012), members of Congress must report stock trades above $1,000 within 45 days.
The Clerk offers one ZIP file per year with an XML index of every filing.
No API key, no dependencies, Python 3.8 or newer. Standard library only (urllib, zipfile, xml.etree).
A GitHub Actions workflow runs the script every Monday and commits the fresh FILINGS.md, so the list in the repo stays current without anyone touching it.
- Дата записи: 2026-11-02T15:28:47.534Z