# briggs-v-airlines

Which Briggs & Riley carry-on / underseat bags fit which airlines' cabin baggage
limits — a fits / doesn't-fit matrix built by scrapers.

**Unofficial and independent.** Not affiliated with, endorsed by, or connected to
Briggs & Riley or any airline. Bag data comes from briggs-riley.co.uk product pages;
airline limits come from each airline's own official page (some via Internet Archive
snapshots of those same official pages where live scraping was blocked — each entry
records `source_url` and, where used, `archive_url`). No B&R logos or trademarks are
used; product images are not reproduced (links point to B&R's own CDN).

## Re-run everything (one command)

```
C:/miniconda3/envs/python312/python.exe run_all.py
```

This re-scrapes Briggs & Riley UK and the 26 airlines' official cabin-baggage pages,
curates `data/airlines.json`, rebuilds the fit matrix (`data/matrix.json`) and the
static site (`site/`).

Serve locally:

```
C:/miniconda3/envs/python312/python.exe -m http.server 8765 --directory site
```

then open http://127.0.0.1:8765/ .

## Layout

- `scrapers/scrape_briggs.py` — Shopify `products.json` + per-product pages via
  Playwright (the store bot-blocks plain HTTP); parses the "Exterior Dimensions
  (includes wheels & handles)" spec block. Output: `data/bags.json`, `data/bags_raw.json`.
- `scrapers/scrape_airlines.py` — fetches each airline's official page (HTTP first,
  Playwright fallback). Output: `data/airlines_raw.json`, `data/raw/`.
- `scrapers/build_airlines.py` — curates `data/airlines.json` (per-airline limits,
  weights, fare-class notes, evidence strings, archive URLs where used).
- `scrapers/build_matrix.py` — fit logic → `data/matrix.json`.
- `scrapers/build_site.py` — static site → `site/` (index matrix + per-bag pages).
- `run_all.py` — the one command above.

## Fit rule

A bag fits an airline's cabin-bag limit when its exterior dimensions (incl. wheels
and handles), sorted largest first, are each <= the airline's limit dimensions sorted
the same way — no tolerance fudging, 1 cm over is "doesn't fit" (the margin in cm is
shown). Expanded-depth variants are evaluated separately ("fits unexpanded only").
If the airline has a weight limit, the bag's empty weight must leave room under it
(remaining allowance shown). Bags are also checked against the airline's
personal-item / underseat allowance.

## Deploy

Cloudflare Pages project `briggs-v-airlines` → https://briggs-v-airlines.pages.dev
(owner rule: no public publishing on weekdays 09:00–18:30 UK):

```
wrangler pages deploy site --project-name briggs-v-airlines
```
