Skip to content

v0.2.1

Choose a tag to compare

@jehrr jehrr released this 07 Sep 17:51
· 17 commits to main since this release
e9cc591

Patch release: four fixes, one of which was a live bug rather than a hypothetical.

Multi-page runs were silently returning page 1

Measured live on 2026-09-07: farfetch.com serves no anchor matching any of the three NEXT_PAGE_SELECTOR entries this project shipped with. So --pages 3 fetched one page and exited 0 — a complete-looking, successful run holding a third of the data.

Three layers now, weakest signal last:

  • <link rel="next"> leads the selector list — the site does serve it (in <head>), and a W3C/SEO convention outlives a build-generated data-testid.
  • product_parser.page_url() reconstructs ?page=N when no selector matches at all, preserving existing filters and replacing rather than duplicating an existing page param.
  • The loop terminates on a page contributing no new sku — a property of the data — instead of on a missing link, a property of a selector.

Verified: 263 unique products across 3 pages from a residential IP, 256 from a datacenter one, status: complete both times.

Page-load retries

A navigation timeout ended the whole run on the first failure — one network flap on page 12 of 50 discarded the rest. --retries (default 3) with a doubling --retry-delay, on every engine. scraper_api_client.py had retries all along; the asymmetry inside one repo was the bug.

Empty CSV now carries its header

write_csv([]) wrote zero bytes, so a consumer of --allow-empty output failed on read instead of reading a valid table with no rows.

A CI job that skipped its own checks

engine-smoke installed playwright and pyppeteer but not selenium, so every selenium-guarded check group skipped in CI — hiding a crash in a mock that had gone stale against the UA change in v0.1.1. The job now installs all three engines and fails if any group reports skipped.

Canary

Requests 3 pages, not 1 — with one page, pagination is never exercised, which is exactly how the bug above stayed invisible. It also now asserts pages_completed, status == "complete" and DOM price-confirmation coverage rather than just a product count.

First scheduled-workflow run (dispatched manually, from a GitHub Actions datacenter IP, no proxy and no API key): passed, 256 products across 3 pages.

See CHANGELOG.md for details.