Skip to content

crawler: adapt Lidl crawler to their new manual upload process - #105

Merged
senko merged 1 commit into
mainfrom
lidl-zip-name-fix
Jul 20, 2026
Merged

senko merged 1 commit into
mainfrom
lidl-zip-name-fix

Conversation

@senko

@senko senko commented Jul 16, 2026 •

Copy link
Copy Markdown
Owner

Fixes #104.

Since 2026-07-14 Lidl appears to have switched to manually uploading their price lists. The ZIP names became ad-hoc and inconsistent (securehub-download (Cijene_14.07.).zip, cijene za 16.07.zip, ...), the CSVs moved into a subdirectory inside the ZIP, some days the payload is a ZIP inside a ZIP, and some files are only linked from the /cijene/cijene-u-trgovinama sub-page rather than the main price list page. Each of these independently broke the crawler.

The crawler now scrapes both pages, treats dates parsed from ZIP names as hints only (day/month match, lenient separators, optional year), verifies candidates against the dates embedded in the CSV filenames (which are still machine-generated and stable), and handles the nested directory / double-ZIP packaging.

Verified against all upload variants seen from 14.07 through 17.07, plus a byte-identical regression check on the old format (13.07).

Note: files now disappear from Lidl's site after a few days, so 14.07 and 15.07 likely can't be backfilled retroactively — the back-filling support discussed in #90 remains the long-term fix for that class of problem.

Since 2026-07-14, Lidl price list ZIPs are uploaded manually with
ad-hoc names (often without a year), sometimes with CSVs nested in a
subdirectory or wrapped in a ZIP inside the ZIP, and are sometimes
linked only from the /cijene/cijene-u-trgovinama sub-page.

* scrape both index pages and treat dates parsed from ZIP names as
  hints only (day/month match, lenient separators, optional year)
* verify candidate ZIPs against the dates embedded in the CSV
  filenames, which remain machine-generated and stable
* unwrap one level of ZIP-in-ZIP and handle nested directories

Fixes #104

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@senko
senko merged commit f3e2608 into main Jul 20, 2026
3 checks passed
@senko
senko deleted the lidl-zip-name-fix branch July 20, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lidl missing from daily archives since 2026-07-14

1 participant