Extracts Pokémon team information from a https://pokepast.es/ URL to a JSON-serializable Python object.
Project description
pokepastes-scraper
A simple library that converts a Pokemon team from https://pokepast.es to a object in Python. Supports conversion to and from JSON.
Installation
pip install -U pokepastes-scraper
Usage
Let's say we want to parse this team which Gavin Michaels used to win the Oceania World Championships. Simply call team_from_url
:
import pokepastes_scraper as pastes
team = pastes.team_from_url("https://pokepast.es/5c46f9ec443664cb")
for mon in team.members:
print(f'{mon.species} with {mon.item or "no item"} (Tera: {mon.tera_type})')
Output:
Iron Hands with Assault Vest (Tera: Grass)
Amoonguss with Sitrus Berry (Tera: Steel)
Pelipper with Focus Sash (Tera: Flying)
Palafin with Mystic Water (Tera: Water)
Baxcalibur with Dragon Fang (Tera: Poison)
Dragonite with Lum Berry (Tera: Flying)
For a detailed example output of team_from_url
, see example/example.py
and its output example/example_team.json
.
Tested in python 3.11, but likely compatible with 3.10+. Feel free to contact me: myapaulogies@tuta.io
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pokepastes_scraper-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5f8bb846a69d6991030bcd13577f1c2c26ac0d4477b400e6d0a928bbd93e8fbb |
|
MD5 | c50f0b882110a10d203e08f1d2c8e633 |
|
BLAKE2b-256 | 4696724c2962b0141017d1fe6de0f16a802aafd0192608c4f83bb172e9505166 |