CdepScraper is a Python library focused on extracting and processing legislative bill information from HTML pages retrieved from cdep.ro’s “Urmarire legislativa” (Legislative follow-up) section. The primary goal is to accurately interpret and structure bill data for downstream analysis, rather than crawling or scraping at scale.
- HTML Data Processing: Extracts bill number, title, and basic metadata from individual legislative bill pages.
- Modular API: Use via the
PLXRepositoryclass for structured workflows. - Planned Outputs: JSON, CSV, and SQLite database entries.
- Extensible: Designed to support bill timeline analysis and attachment support in future releases.
- MIT Licensed: Open and free to use with attribution.
Install the required dependencies using pip:
pip install -r requirements.txtThen import the library in your Python project.
The main API is built around the PLXRepository class. Example usage:
from cdep_scraping.PLXRepository import PLXRepository
repo = PLXRepository("mySQLiteFile.db") # Optional: specify DB file for persistence
# Add bill data from HTML string
repo.addPLXFromHTMLString(myHTMLFileHere)
# Save repository data to JSON file
repo.saveToJSON(myPath)
# Remove a bill by its number
repo.removeByPLXNumber(myPLXNumber)
# Save current state to SQLite DB
repo.saveToDB()Note: The API is under active development. Some functionality (like full bill timeline analysis and attachment handling) is not yet implemented.
No configuration files are required for current versions. This may change as features are added.
- JSON
- CSV
- SQLite (local .db files)
- Full bill timeline parsing
- Bill attachment support
- GUI tools for easier data handling
This project is licensed under the MIT License. Please see LICENSE for details and attribution requirements.
- gabriel-a-rsch (project founder)
- For issues or requests, use the GitHub Issues page.
- For urgent matters, see the email address on my GitHub profile.
This README is a living document and will be updated as features are added. Contributions and feedback are welcome!