Py’otrMuhammad Toheed Sahar

Product Catalogue Scraper for a Dutch E-commerce Store

I built a scraper that turns product pages from a Dutch online store into a CSV in the client's own column layout, with every technical spec in its own column.

Client
A Dutch online store for specialist equipment
Year
2026
Type
Data & pipelines

The problem

The client needed full product data (title, prices, images, long description and technical specs) from a Dutch catalogue, in a fixed column layout. The specs sit in different places on different products, and the site has its own typos and mixed text encodings.

How I built it

Each page is downloaded with an encoding repair step, then parsed into the core fields: breadcrumb, title, short description, price and sale price, gallery images and the full description. The Specificaties list in the description is exploded so every spec becomes its own column. When a product has no inline spec list I fall back to its attribute table. Spec labels are normalised so differences in casing, spacing and a site typo merge into one column. A verification sheet lists every extracted value so it can be checked against the live page.

What got hard

  1. Pages are mostly UTF-8 but carry stray Windows-1252 bytes, which turned characters such as the diameter sign into garbage and showed degree signs wrongly in Excel.

    A decoder keeps valid UTF-8 sequences and repairs only the stray bytes, and the CSV is written as UTF-8 with a BOM so Excel shows the characters correctly.

  2. Two spec sources on the same product page disagree: the description list and the 'Extra informatie' tab give different values for some products.

    The description list is the primary source and the attribute table is only a fallback, and the conflict is called out in the verification sheet so the client can choose which to trust.

  3. The same spec is labelled inconsistently across products, in casing, spacing and in one case a typo.

    Labels are normalised before columns are built, so duplicates merge, while genuinely different specs (for example gross and net capacity) keep their own columns.

The result

A 15-product sample CSV with 42 columns (9 core and 33 spec columns) and a separate 2-product sample whose values were checked verbatim against the live page source.