Skip to content

shadforth/pokemon-web-scraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pokémon Web Scraper

A little Python CLI application that scrapes Serebii.net. Mostly made for my Vue Pokédex project.

Gotta scrape 'em all!

Getting started

Prerequisites

  • Python
  • pip

Installation

Navigate to the project's root directory and run the following commands. By default, python scraper.py will only retrieve Bulbasaur.

pip install -r requirements.txt
python scraper.py

Usage

Some useful commands are listed below.

# Help on running the script
python scraper.py --help

# Specify which Pokémon to retrieve (1-10)
python scraper.py --first 1 --last 10

# Save output to a JSON file with the `--save` flag
python scraper.py --first 1 --last 10 --save

# View the retrieved web output in console
python scraper.py --verbose

Sample JSON output

Output JSON file when using the --save flag.

[
  {
    "name": "Bulbasaur",
    "number": "#001",
    "classification": "Seed Pok\u00e9mon",
    "height": ["2'04\"", "0.7m"],
    "weight": ["15.2lbs", "6.9kg"],
    "hit_points": 45,
    "attack": 49,
    "defense": 49,
    "special": 65,
    "speed": 45
  }
]