This Python script automates the process of fetching Pokémon card prices from Cardmarket and saves them into a CSV file.
It uses Selenium with undetected_chromedriver to bypass Cloudflare protection and extract Trend Price and 30-Day Avg Price.
✔ Fetches live prices from Cardmarket
✔ Bypasses Cloudflare protection using undetected_chromedriver
✔ Saves prices into a CSV file
✔ Automatically calculates total Trend Price & 30-Day Avg Price
✔ Runs minimized so it doesn’t interrupt your workflow
✔ Extracts Pokémon name and set from the URL
✔ Stores historical price data in JSON (data/price_history.json)
✔ Visualizes individual and total price history with Matplotlib
Run the following command to install the required Python packages:
pip install pandas undetected-chromedriver selenium matplotlibThe script requires Google Chrome installed on your system.
Create a data folder in your project root directory to store historical data:
mkdir dataSave your Pokémon URLs to:
C:\Users\NAME\Downloads\pokemons_cards.csvThis CSV should have one column labeled URL:
URL
https://www.cardmarket.com/en/Pokemon/Products/Singles/Crown-Zenith/Giratina-VSTAR-CRZGG69
https://www.cardmarket.com/en/Pokemon/Products/Singles/Crown-Zenith/Arceus-VSTAR-CRZGG70Run main.py to fetch prices and update your CSV and historical data:
python main.py- Prices will be saved in:
C:\Users\NAME\Downloads\updated_pokemons_cards.csv
- Historical price data stored in:
data/price_history.json
You can visualize historical price changes using the provided visualizer script:
python visualizer.py- Search using partial or full card names.
- See the historical trends visually.
- Visualize total collection price changes by typing
total.
After running, you’ll get:
- Updated prices saved in
C:\Users\NAME\Downloads\updated_pokemons_cards.csv - The final CSV file will contain:
Pokemons;Set;URL;Trend Price;30-Day Avg Price Giratina VSTAR CRZGG69;Crown Zenith;https://www.cardmarket.com/en/Pokemon/Products/Singles/Crown-Zenith/Giratina-VSTAR-CRZGG69;232.3;244.37 Arceus VSTAR CRZGG70;Crown Zenith;https://www.cardmarket.com/en/Pokemon/Products/Singles/Crown-Zenith/Arceus-VSTAR-CRZGG70;208.29;172.72
To make a standalone .exe that does not require Python, follow these steps:
Make sure you have PyInstaller installed by running:
pip install pyinstallerRun this command inside the folder where your gui_version2.py file is located:
- Select the CSV
- Wait until it is finished! (Progress Bar)
- Select where you want to save the new CSV file
- Can choose to see the graph of the history prices
pyinstaller --onefile --noconsole --hidden-import pandas --hidden-import selenium gui_scraper.py✔ --onefile → Creates a single .exe file
✔ --noconsole → Hides the black terminal window
✔ --hidden-import pandas --hidden-import selenium → Ensures all dependencies are included

After PyInstaller finishes, go to:
C:\Pokemon-Card-Tracking-main\dist\
You will find:
gui_scraper.exe
- Create a new folder (e.g.,
PokemonScraperApp). - Move
gui_scraper.exeinto the folder. - Right-click the folder → Compress to ZIP.
- Send the
.zipfile via Google Drive, Discord, or WeTransfer.
- Unzip the file into a folder.
- Double-click
gui_scraper.exeto run it. - Upload their CSV file when prompted.
- Wait for the updated CSV to be saved in the same folder.
That’s normal. The script opens a hidden Chrome session to fetch prices and then closes it automatically.
Try increasing the time.sleep(5) delay in the script to avoid hitting Cardmarket’s rate limit.
Ensure Google Chrome is installed. The .exe uses Chrome to fetch prices.
- ✅ Schedule automatic daily price updates using Windows Task Scheduler