LinkedInWebScraper

Configuration

This project supports typed programmatic config and TOML-driven runtime config.

Programmatic Library Config

JobScraperConfig

JobScraperConfig captures the runtime inputs for a single scrape:

JobScraperAdvancedConfig

Use it for optional overrides such as:

Runtime Enums

Runtime TOML Config

The tracked template is runtime.example.toml. A real runtime.toml can define:

[logging]
level = "INFO"
file_name = "main.log"

[storage]
file_name = "linkedin_jobs.sqlite"
state_dir = "artifacts/state"

[scrape.once]
position = "Data Scientist"
location = "Monterrey"
openai_enabled = false
openai_model = "gpt-4o-mini"
time_posted = "DAY"
remote_types = ["REMOTE", "HYBRID", "ON-SITE"]
file_name = "LinkedIn_Jobs_Data_Scientist_Monterrey.csv"
output_dir = "artifacts/jobs"
append = true

[scrape.daily]
cities = ["Monterrey", "Guadalajara", "Mexico City"]
position = "Data Scientist"
openai_enabled = false
openai_model = "gpt-4o-mini"
time_posted = "DAY"
output_dir = "artifacts/jobs"
combined_file_name = "LinkedIn_Jobs_Data_Scientist_Mexico.csv"

[export]
run_id = ""
file_name = "linkedin_jobs_export.csv"
output_dir = "artifacts/jobs"

CLI Override Precedence

The runtime precedence is:

  1. CLI flags
  2. environment overrides
  3. TOML file values
  4. code defaults

Supported env overrides include:

OpenAI Runtime Behavior

OpenAI support remains optional.

Artifact And State Paths

Managed defaults resolve under artifacts/:

Explicit absolute paths and explicit nested relative paths are preserved.

Storage Model

SQLite persistence is enabled by default for CLI and DailyScrapeService workflows.

Use build_sqlite_storage_url() for a managed default URL, or inject SQLiteScrapeStorage(storage_url=...) into DailyScrapeService when you need a custom local path or DSN.

Root Runtime Scripts

main.py and process_ds_jobs.py remain available as direct runtime entrypoints for the daily and once workflows.