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"])
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
# 0pt Scraper → b0ts
|
||||
|
||||
Scraper code has moved to the **b0ts** repo:
|
||||
https://git.siax.io/admin/b0ts
|
||||
|
||||
## Quick start
|
||||
|
||||
```bash
|
||||
git clone https://git.siax.io/admin/b0ts.git
|
||||
cd b0ts
|
||||
python -m src.main
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
b0ts runs on port 4115:
|
||||
- `POST /pipeline/start` — Start continuous scraping
|
||||
- `GET /pipeline/status` — Check progress
|
||||
- `GET /analytics/quality` — Data quality metrics
|
||||
|
||||
## MCP
|
||||
|
||||
MCP tools available at `schemas/mcp/b0ts.mcp.json`.
|
||||
|
||||
## Deployment
|
||||
|
||||
```bash
|
||||
# On SIAX Cloud Server 2
|
||||
ssh -i ~/.ssh/id_ed25519_siax root@188.40.230.69
|
||||
cd /opt/b0ts && python3 -m src.main
|
||||
```
|
||||
Reference in New Issue
Block a user