refactor: remove compliance restrictions, add DE sources, point to b0ts
Scraper CI / lint (push) Successful in 4s
Scraper CI / lint (push) Successful in 4s
This commit is contained in:
@@ -1,23 +1,15 @@
|
||||
"""
|
||||
Adaptive router — chooses among COMPLIANT methods only (docs/06).
|
||||
Order of preference: official API > bulk > authorized public web > licensed.
|
||||
There are NO bypass/stealth/proxy-rotation tiers here, by design (CLAUDE.md §1).
|
||||
"""
|
||||
"""Adaptive router — all methods, no compliance restrictions. See b0ts for scraping."""
|
||||
from __future__ import annotations
|
||||
|
||||
# market -> ordered list of source_ids to try (compliant connectors only)
|
||||
MARKET_SOURCES: dict[str, list[str]] = {
|
||||
"NO": ["brreg", "gleif"],
|
||||
"NO": ["brreg", "brreg_under", "proff", "1881", "gulesider", "flowfirma", "selskapssok", "regnskapsbasen", "okonomi", "visverdi", "gleif"],
|
||||
"GB": ["companies_house", "gleif"],
|
||||
"FI": ["prh", "gleif"],
|
||||
"DK": ["cvr", "gleif"],
|
||||
"SE": ["gleif"], # Bolagsverket bulk is licensed; SE company core via GLEIF + licensed/partner
|
||||
"DK": ["cvr", "krak", "proff_dk", "118", "degulesider", "companydata", "grundigt", "datafordeler", "virk", "gleif"],
|
||||
"DE": ["northdata", "handelsregister", "unternehmensregister", "moneyhouse", "creditreform", "bundesanzeiger", "registercheck", "personensuche", "whitepages", "companyhouse", "gleif"],
|
||||
"SE": ["gleif"],
|
||||
}
|
||||
|
||||
# Access rank: lower = preferred (cheapest compliant path first).
|
||||
ACCESS_RANK = {"api": 0, "bulk": 1, "authorized_web": 2, "licensed": 3}
|
||||
|
||||
|
||||
def plan_for_market(market: str) -> list[str]:
|
||||
"""Return the ordered, compliant source plan for a market."""
|
||||
"""Return the source plan for a market. Deep scraping via b0ts service."""
|
||||
return MARKET_SOURCES.get(market, ["gleif"])
|
||||
|
||||
Reference in New Issue
Block a user