How I Built a Web Scraper to Catch 'Em All (Data-wise)


I’ve been working on a fun little side project I call the Pokémon TCG Pocket Trading Hub — basically a place for my friends and I to view what cards we have available to trade and what cards we have on our wishlist from the Pokémon TCG Pocket app. At first, I figured I’d just grab the data I needed from an API, because surely there’d be one out there for something as massive as Pokémon, right? Right…? Turns out, not so much. While there are Pokémon TCG APIs out there, none of them had what I was actually looking for: the cards from the Pocket app specifically. I hit a bit of a wall there, but that’s when I started looking into alternative ways to get the data — and stumbled into the wonderfully chaotic world of web scraping. I didn’t expect to love it as much as I did, but there was something genuinely satisfying about watching my tiny automated browser buddy hop from one card to the next, collecting data like a digital Pokédex.
To make it all happen, I used a mix of Selenium and BeautifulSoup — and honestly, the two make a pretty great team. Selenium handled the browser automation, letting me scroll through the site, click into each individual Pokémon card, and wait for everything to load (since the site was a little JavaScript-heavy). BeautifulSoup came in after that to parse the HTML and pluck out exactly the pieces I needed, like the card name, rarity, type, and any other info I could get my hands on. It was basically like a little bot version of myself, trained to go “ooh, shiny!” every time a new card appeared on the page.
One of my favorite parts of the whole process was just watching it run — the browser opening in the background, the little digital scout clicking through card after card with perfect patience. There was something oddly charming about it. I’d catch myself cheering it on like, “Go little guy, you got this!” It felt like my own version of sending a Pokémon out into the wild to gather data for the team.
And of course, once I had everything scraped and structured in a Python dictionary, it only took a few extra lines to pipe all that juicy card data into a .json
file. That way, I could reuse it later, build with it, or just admire how clean and satisfying the formatting looked (there’s something deeply rewarding about curly braces lining up just right, you know?). Here's a quick example of that final step:
with open("pokemon_cards.json", "w", encoding="utf-8") as json_file:
json.dump(all_cards, json_file, indent=4, ensure_ascii=False)
Boom — instant Pokédex, straight from the source.
This whole thing ended up being one of those projects that reminded me why I love coding in the first place. It wasn’t just about solving a problem — it was about getting scrappy (pun intended), thinking outside the box, and building something from scratch when the “easy” option didn’t exist. There’s a weird kind of magic in that, especially when the result is a neat little .json
file packed with Pokémon cards that my scraper so politely gathered like a polite data-obsessed Pikachu.
I’ll definitely keep expanding the Pokémon TCG Pocket Trading Hub as I go, maybe even add sorting or filtering features down the line, or set up a live tracker for when new cards drop. And now that I’ve dipped my toes into web scraping, I’m honestly excited to find other places where APIs fall short and the browser bot can come out to play again. Sometimes, you don’t need the official route — you just need a little code, a lot of curiosity, and a Selenium sidekick to help you catch ‘em all.
Hope this gave you a fun peek into the behind-the-scenes of scraping and structuring data when the usual tools aren’t available. Now that I’ve got all my Pokémon neatly packed into a .json
file, it’s time to shift gears and start working on the front-end — or maybe just take a break and admire the fact that I taught a tiny bot how to appreciate rare cards. Either way, the adventure continues.
Here’s a link to my github repo so that you can see how to implement a web-scraper yourself: LINK
Subscribe to my newsletter
Read articles from Breanna Humphres directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Breanna Humphres
Breanna Humphres
Hi, I'm Bre! I'm a software engineering graduate of Flatiron School. I graduated in November of 2024 and look forward to joining the gaming development or tech world! I'm very passionate about gaming, and have a big goal of working in the gaming development world.