How dmich98/pokemon-parser works
This is a Pokémon catalog scraper: it fetches catalog pages, extracts product URLs, fetches each product page, parses Pokémon fields, and can serialize records to CSV. The catalog and product scraping stages each own their HTTP and parser calls. The shared parsers use a Cheerio-backed base, while Pokémon field values are normalized into the Pokémon model. CSV storage is a separate capability. The available excerpts do not show how main.ts wires these components or invokes storage, so those links are omitted.
Main entry points: PokemonParser.ts Pokémon parser · HttpClient.ts HTTP client · CatalogScraper.ts Catalog scraper · PokemonScraper.ts Pokémon scraper
Components 11
Scraping
- Catalog scraper
src/scrapers/CatalogScraper.ts - Pokémon scraper
src/scrapers/PokemonScraper.ts
Parsing
- Catalog parser
src/parsers/CatalogParser.ts - Pokémon parser
src/parsers/PokemonParser.ts - HTML parser base
src/parsers/BaseParser.ts
Domain and storage
- Value normalization
src/utils/normalize.ts - Pokémon record
src/models/Pokemon.ts - CSV storage
src/storage/CsvStorage.ts
Transport
- HTTP client
src/services/HttpClient.ts
Other components
- Application entry
src/main.ts - Web server
Connections 9
- Catalog scraper → HTTP client: fetches pages
src/scrapers/CatalogScraper.ts - Catalog scraper → Catalog parser: parses HTML
src/scrapers/CatalogScraper.ts - Pokémon scraper → HTTP client: fetches products
src/scrapers/PokemonScraper.ts - Pokémon scraper → Pokémon parser: parses HTML
src/scrapers/PokemonScraper.ts - Catalog parser → HTML parser base: extends
src/parsers/CatalogParser.ts - Pokémon parser → HTML parser base: extends
src/parsers/PokemonParser.ts - Pokémon parser → Value normalization: normalizes fields
src/parsers/PokemonParser.ts - Pokémon parser → Pokémon record: creates record
src/parsers/PokemonParser.ts - HTTP client → Web server: requests pages
src/services/HttpClient.ts