v1.6.5: Refactor logging & integrate improved WikipediaScraper

- Replace custom `debug_print` function with standard Python `logging` module calls throughout the codebase.
    - Use appropriate logging levels (DEBUG, INFO, WARNING, ERROR, CRITICAL, EXCEPTION).
    - Refactor logging setup in `main` for clarity and proper handler initialization.
- Integrate updated `WikipediaScraper` class (previously developed as v1.6.5 logic):
    - Implement more robust infobox parsing (`_extract_infobox_value`) using flexible selectors, keyword checking (`in`), and improved value cleaning (incl. `sup` removal).
    - Remove old infobox fallback functions.
    - Enhance article validation (`_validate_article`) with better link checking via `_get_page_soup`.
    - Improve reliability of article search (`search_company_article`) with direct match attempt and better error handling.
    - Apply `@retry_on_failure` decorator to network-dependent scraper methods (`_get_page_soup`, `search_company_article`).
- Ensure `Config.VERSION` reflects the logical state (v1.6.5 for this commit).
This commit is contained in:
2025-04-19 16:53:35 +00:00
parent bde384c1a8
commit 6c1fd91a69

File diff suppressed because it is too large Load Diff