m. MuskatGroupRU ↗

MuskatGroup / Products

FrutoScraper: reviews beyond nested tags

A DOM parsing lab: Rust extracts review fields and explains the path to every text fragment.

RustAxumHTML5ReactTypeScriptVite
DOM parsing lab with source HTML and extracted fields

The task

Turn an unfinished review scraper into a clear demonstration. The original Python/Selenium code and Rust prototype depended on old marketplace classes and child-node counts. Changes in nesting could lose parts of a comment or assign text to the wrong field.

Traverse the tree, not the tag count

The Rust parser identifies review cards and content containers using a CSS selector profile. It walks the DOM in document order, tracking comment, pros, cons and variant labels. Extra wrappers do not change field meaning, inline tags do not split words, and block elements separate paragraphs.

Controls, hidden nodes and marked seller replies are excluded. A nested card cannot leak into its parent’s comment. Missing values remain null; dates and ratings are not guessed. Only stable IDs remove duplicates; identical prose in separate reviews is preserved.

The lab

Choose one of four synthetic HTML examples, run the actual Rust parser and compare markup with extracted fields. Selecting a field reveals each fragment’s DOM path, depth and extraction rule. Download the report as JSON or CSV.

Russian and English, light and dark themes, mobile layouts and keyboard navigation support exploration. API errors preserve the prior result. Every sample product and review is fictional; the public server makes no requests to marketplaces.

A local tool

The CLI processes one HTML file or fetches an HTTPS product page. Profiles adapt review boundaries when markup changes. JavaScript pages require a saved rendered HTML file; the tool does not bypass access blocks or promise support for today’s Ozon markup. Automatic pagination is outside this version.

Architecture

Rust, Axum and the scraper HTML5 DOM parser separate HTTP, retrieval and extraction. OpenAPI generates TypeScript types for the React/Vite interface. The public API accepts prepared sample IDs only. No database, accounts or file store are needed.

An independent Compose project updates separately from other demos, with its API on a private network. The public demo button will be enabled after deployment to its own subdomain.

Product interface

Open demo ↗