You will need pnpm and Postgres running locally.
Web frontend (Astro, in web/):
> cd web
> pnpm install
> pnpm run devThe frontend is a static site built from web/src/data/models.json, which is
generated from the Postgres database by scripts/build_data.py.
Scrapers run in Docker (via the compose file in mediaserver):
> docker compose -f /Users/jokull/mediaserver/docker-compose.yml up -d orflaedi_scrapyJS-heavy retailer sites that can't be scraped over plain HTTP (e.g. stormur.is)
use host-side Scrapling/Playwright spiders in scrape/scrapling_spiders/,
run with the repo venv:
> .venv/bin/python scrape/scrapling_spiders/stormur.pyThis project scrapes Icelandic e-bike retailer websites
- ellingsen.s4s.is
- orninn.is
- kriacycles.is
- tri.is
- rafmagnshjol.is
- reidhjolaverzlunin.is
- markid.is
- gap.is
- peloton.is
- ofsi.is
- hjolasprettur.is
- hvellur.com
- bike.is (Fjallakofinn)
- everest.is
- nova.is
- skidathjonustan.com (Akureyri)
- elko.is
- sensabikes.is
- gastec.is
- scb.is
- unno.is
TODO
Vehicles can be browsed on these dimensions
- Price
- Below 60.000 kr
- Between 60.000 and 130.000 kr
- Between 130.000 and 250.000 kr
- Between 250.000 and 600.000 kr
- Above 600.000 kr
- Vehicle classification
- Reiðhjól C (mostly scooters)
- Reiðhjól B (e-bikes)
- Létt bifhjól (light two wheeler above 250w)
- Hraðhjól (also called Létt bifhjól 2, light two wheeler above 25km/h top speed)
- Retailer
- see websites above
In the future it would be good to connect vehicles to electribikereview.com to get frame types, purpose (gravel, city, cargo etc.). I scraped the bike brand name too. Could add a filter for that to the UI.
The site is hosted on Cloudflare Workers (www.orflaedi.is). Every hour a
launchd agent (com.orflaedi.update-and-deploy) runs
bin/update-and-deploy.sh, which:
- waits for any running scrapers to finish
- runs the host-side Playwright spiders
- rebuilds
web/src/data/models.jsonfrom Postgres (scripts/build_data.py) - classifies new/untagged bikes with Claude (
scripts/classify.py) - rebuilds the data and runs the Astro build
- deploys to Cloudflare with
wrangler deploy
Scraper Python dependencies live in requirements.txt (installed by
Dockerfile.scrapy and the Scrapy Cloud image via scrapinghub.yml). The
legacy FastAPI/starlette web app was retired when the frontend moved to Astro.