Skip to main content

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

pokepastes-scraper-0.2.2.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

pokepastes_scraper-0.2.2-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pokepastes-scraper-0.2.2.tar.gz.

File metadata

  • Download URL: pokepastes-scraper-0.2.2.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.1

File hashes

Hashes for pokepastes-scraper-0.2.2.tar.gz
Algorithm Hash digest
SHA256 daca3e2b5c61bf8c3ffd697446df37d41422921d02213431c406ecee347942b5
MD5 cd9746b0325d00fcc13512bd951d664d
BLAKE2b-256 29604af712e79f4acc5827485e7a5d6412ff5d7f1ab5a2564e06453ba8486cdd

See more details on using hashes here.

File details

Details for the file pokepastes_scraper-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pokepastes_scraper-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 03578e23fd7a97e7231cb365dbf4daad036390fbb8f23973527dd3115dec9af8
MD5 530867e39c9a62ebaa7aebe7e9ef18ef
BLAKE2b-256 2ce1b546f628f4adcdbd25dba21d38ae1616102289878d56ff3adaddcfb831a4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page