Skip to content

HTML-Based ForexFactory Scraper

Latest

Choose a tag to compare

@ehsanrs2 ehsanrs2 released this 27 Jun 11:57
· 7 commits to main since this release

Overview

This release simplifies the ForexFactory scraper around the validated HTML-based workflow and removes the previous Selenium/ChromeDriver dependency chain.

The project now uses direct ForexFactory calendar HTML fetching as the default data source, supports long-lived CSV cache updates, and includes canonical cache validation to prevent duplicate events across legacy and normalized schemas.

Highlights

  • Replaced Selenium-based scraping with the default forexfactory-html provider.
  • Removed ChromeDriver, Selenium, and undetected_chromedriver dependencies.
  • Added a cleaner, user-friendly README focused on the working HTML workflow.
  • Added cache validation tooling for long-lived historical CSV files.
  • Preserved support for legacy cache rows while preventing duplicate events.
  • Kept saved-html as an offline/local fallback provider.
  • Kept forexfactory-export as an optional limited export-file provider.
  • Confirmed idempotent updates: rerunning the same date range does not add duplicate rows.

Breaking Changes

  • Removed Selenium-specific CLI options:

    • --driver
    • --chrome-binary
    • --chromedriver
    • --headless
    • --no-headless
    • --user-agent
    • --user-data-dir
    • --manual-verification-timeout
    • --retries
  • Removed Selenium-related modules and dependencies:

    • selenium
    • undetected-chromedriver
    • ChromeDriver setup and troubleshooting workflow

The default online scraping path is now direct HTML fetching.

Recommended Usage

Update the cache:

python -m src.forexfactory.main \
  --start 2025-04-07 \
  --end 2026-04-06 \
  --csv forex_factory_cache.csv \
  --tz Asia/Tehran \
  --details \
  --debug