# jmldigital/parseplaywrightoriginall architecture

> Architecture diagram of the GitHub repository jmldigital/parseplaywrightoriginall, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jmldigital/parseplaywrightoriginall
- Repository: https://github.com/jmldigital/parseplaywrightoriginall

## Overview

This is an asynchronous auto-parts price and name parser. The main workflow reads an Excel inventory, dispatches product lookups through workers to retailer scrapers, handles authentication and CAPTCHA when needed, then adjusts prices and saves results. The README also documents name parsing, four retailer sources, and optional Telegram and proxy support. The sampled main.py excerpt confirms worker and CAPTCHA orchestration; unsampled modules are included where the README and source index establish their product role, with uncertain connections omitted.

Main entry points: [`main.py`](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/main.py) (Worker pool), [`config.py`](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/config.py) (Parser configuration), [`scraper_stparts.py`](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_stparts.py) (STParts scraper), [`scraper_avtoformula.py`](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_avtoformula.py) (AvtoFormula scraper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Parsing workflow"]
  node_inventory["Excel inventory"]
  node_runner["Async runner<br/>[main.py]"]
  node_workers["Worker pool<br/>[main.py]"]
end

subgraph group_sources["Retailer sources"]
  node_stparts["STParts scraper<br/>[scraper_stparts.py]"]
  node_avtoformula["AvtoFormula scraper"]
  node_adeo["Adeo scraper<br/>[scraper_adeo.py]"]
  node_emex["Emex scraper<br/>[scrape_emex.py]"]
  node_armtek["Armtek scraper<br/>[scraper_armtek.py]"]
end

subgraph group_support["Access and resilience"]
  node_auth["Cookie login<br/>[auth.py]"]
  node_captcha_queue["CAPTCHA queue<br/>[captcha_manager.py]"]
  node_captcha_solver["CAPTCHA solver<br/>[utils.py]"]
  node_config["Parser configuration<br/>[config.py]"]
  node_cache[("Lookup cache<br/>[cache_manager.py]")]
end

subgraph group_results["Results and delivery"]
  node_price_rules["Price adjustment<br/>[price_adjuster.py]"]
  node_output["Excel results"]
  node_telegram_bot["Telegram controls<br/>[bot.py]"]
  node_telegram_sender["Telegram delivery<br/>[telegram_sender.py]"]
end

node_operator(("Operator"))
node_telegram(("Telegram service"))
node_captcha_service(("2Captcha service"))

node_operator -->|"provides"| node_inventory
node_inventory -.->|"loaded by"| node_runner
node_runner -->|"starts"| node_workers
node_workers -->|"requests"| node_captcha_queue
node_captcha_queue -->|"delegates to"| node_captcha_solver
node_captcha_solver -.->|"submits challenge"| node_captcha_service
node_workers -.->|"dispatches"| node_stparts
node_workers -.->|"dispatches"| node_avtoformula
node_workers -.->|"dispatches"| node_adeo
node_workers -.->|"dispatches"| node_emex
node_workers -.->|"dispatches"| node_armtek
node_runner -->|"uses login"| node_auth
node_avtoformula -->|"uses login"| node_auth
node_runner -->|"reads settings"| node_config
node_auth -->|"reads selectors"| node_config
node_stparts -.->|"reads selectors"| node_config
node_avtoformula -->|"reads selectors"| node_config
node_armtek -->|"reads selectors"| node_config
node_runner -->|"applies adjustments"| node_price_rules
node_price_rules -->|"saves workbook"| node_output
node_runner -.->|"writes interim data"| node_output
node_telegram_bot -.->|"starts parser"| node_runner
node_telegram_bot -->|"sends result"| node_telegram_sender
node_telegram_sender -->|"uploads file"| node_telegram
node_operator -.->|"controls"| node_telegram_bot
node_stparts -.->|"uses cache"| node_cache

click node_runner "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/main.py"
click node_workers "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/main.py"
click node_stparts "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_stparts.py"
click node_avtoformula "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_avtoformula.py"
click node_adeo "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_adeo.py"
click node_emex "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scrape_emex.py"
click node_armtek "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_armtek.py"
click node_auth "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/auth.py"
click node_captcha_queue "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/captcha_manager.py"
click node_captcha_solver "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/utils.py"
click node_config "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/config.py"
click node_cache "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/cache_manager.py"
click node_price_rules "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/price_adjuster.py"
click node_telegram_bot "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/bot.py"
click node_telegram_sender "https://github.com/jmldigital/parseplaywrightoriginall/blob/main/telegram_sender.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_inventory,node_runner,node_workers toneBlue
class node_stparts,node_avtoformula,node_adeo,node_emex,node_armtek toneAmber
class node_auth,node_captcha_queue,node_captcha_solver,node_config,node_cache toneMint
class node_price_rules,node_output,node_telegram_bot,node_telegram_sender toneRose
class node_operator,node_telegram,node_captcha_service toneIndigo
```

## Components

### Parsing workflow

- **Excel inventory**
- [Async runner](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/main.py): `main.py`
- [Worker pool](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/main.py): `main.py`

### Retailer sources

- [STParts scraper](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_stparts.py): `scraper_stparts.py`
- [AvtoFormula scraper](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_avtoformula.py): `scraper_avtoformula.py`
- [Adeo scraper](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_adeo.py): `scraper_adeo.py`
- [Emex scraper](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scrape_emex.py): `scrape_emex.py`
- [Armtek scraper](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/scraper_armtek.py): `scraper_armtek.py`

### Access and resilience

- [Cookie login](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/auth.py): `auth.py`
- [CAPTCHA queue](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/captcha_manager.py): `captcha_manager.py`
- [CAPTCHA solver](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/utils.py): `utils.py`
- [Parser configuration](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/config.py): `config.py`
- [Lookup cache](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/cache_manager.py): `cache_manager.py`

### Results and delivery

- [Price adjustment](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/price_adjuster.py): `price_adjuster.py`
- **Excel results**
- [Telegram controls](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/bot.py): `bot.py`
- [Telegram delivery](https://github.com/jmldigital/parseplaywrightoriginall/blob/main/telegram_sender.py): `telegram_sender.py`

### Other components

- **Operator**
- **Telegram service**
- **2Captcha service**

## Connections

- Operator → Excel inventory: provides (evidence: `Readme.md`)
- Excel inventory → Async runner: loaded by
- Async runner → Worker pool: starts (evidence: `main.py`)
- Worker pool → CAPTCHA queue: requests (evidence: `main.py`)
- CAPTCHA queue → CAPTCHA solver: delegates to (evidence: `captcha_manager.py`)
- CAPTCHA solver → 2Captcha service: submits challenge
- Worker pool → STParts scraper: dispatches (evidence: `main.py`)
- Worker pool → AvtoFormula scraper: dispatches
- Worker pool → Adeo scraper: dispatches
- Worker pool → Emex scraper: dispatches
- Worker pool → Armtek scraper: dispatches
- Async runner → Cookie login: uses login (evidence: `main.py`)
- AvtoFormula scraper → Cookie login: uses login (evidence: `scraper_avtoformula.py`)
- Async runner → Parser configuration: reads settings (evidence: `main.py`)
- Cookie login → Parser configuration: reads selectors (evidence: `auth.py`)
- STParts scraper → Parser configuration: reads selectors (evidence: `scraper_stparts.py`)
- AvtoFormula scraper → Parser configuration: reads selectors (evidence: `scraper_avtoformula.py`)
- Armtek scraper → Parser configuration: reads selectors (evidence: `scraper_armtek.py`)
- Async runner → Price adjustment: applies adjustments (evidence: `main.py`)
- Price adjustment → Excel results: saves workbook (evidence: `price_adjuster.py`)
- Async runner → Excel results: writes interim data
- Telegram controls → Async runner: starts parser
- Telegram controls → Telegram delivery: sends result (evidence: `bot.py`)
- Telegram delivery → Telegram service: uploads file (evidence: `telegram_sender.py`)
- Operator → Telegram controls: controls
- STParts scraper → Lookup cache: uses cache
