Skip to main content
100%

Parse a card from Pokemon-card.com (output a JSON file)

✓ Published0🌍 Public
KKevinGutowski
Last edited Apr 3, 2023
Created on Apr 3, 2023

This example parses a single Pokémon card page from pokemon-card.com into a structured JSON file. It extracts the card’s name, type, HP, moves, abilities, weaknesses, resistances, and evolution tree, along with illustrator and regulation-mark metadata. The Python script uses `requests` to fetch the HTML, `bs4` (BeautifulSoup) to parse the DOM, and `json` to output the results. It also handles subclasses like 進化 variants and reads card details from the page’s left and right boxes, returning a complete card record for downstream applications.

AI-generated description

Similar vizzes