Skip to main content

Procyclingstats is a Python package for scraping procyclingstats.com, which is a website with cycling stats. It’s recommended to get familiar with the website before using this package.

Installation

Using pip:

$ pip install procyclingstats

Manual (for development):

$ git clone https://github.com/themm1/procyclingstats.git
$ pip install -r procyclingstats/requirements_dev.txt

Basic usage

Basic Rider class usage:

>>> from procyclingstats import Rider
>>> rider = Rider("rider/tadej-pogacar")
>>> rider.birthdate()
"1998-9-21"
>>> rider.parse()
{
    'birthdate': '1998-9-21',
    'height': 1.76,
    'name': 'Tadej  Pogačar',
    'nationality': 'SI',
    ...
}

Interface consists from scraping classes which are currently Race, RaceStartlist, RaceClimbs, RaceCombativeRiders, Ranking, Rider, RiderResults, Stage and Team. Usage of all scraping classes is almost the same and the only difference among them are parsing methods as is for example birthdate in Rider class usage example.

Unexpected behaviour and parsing errors

Since the project is a web scraper which parses HTML, it’s difficult to make it reliable and it’s common to encounter some HTML parsing problems. After getting some kind of unexpected behaviour or parsing errors, it’s recommended to update the package on your system using pip install procyclingstats --upgrade. If the problem proceeds, see the GitHub issues page and if the issue hasn’t been opened yet, don’t hesitate to open one!

Metadata

Release files for procyclingstats 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for procyclingstats 0.2.8
File Size Uploaded
procyclingstats-0.2.8.tar.gz 34.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for procyclingstats 0.2.8
File Interpreter ABI Platform
procyclingstats-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 76.1 kB

Release files / procyclingstats-0.2.8.tar.gz

Download URL procyclingstats-0.2.8.tar.gz
Size 34.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ff86455453ccfba9d25a93bcd7cf69dae3e07f14d2164be48d45ba0bfe8687e8
BLAKE2b-256 checksum
How to use checksums
990a6adb200ef7338e2d48cf9b59d40c6c7eed25833b5a8083fcf6b250461567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release files / procyclingstats-0.2.8-py3-none-any.whl

Download URL procyclingstats-0.2.8-py3-none-any.whl
Size 41.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fda56f0e67254a58c2e32d30f9bd3aad9c6cda8d06206d18f6e484f290bc9288
BLAKE2b-256 checksum
How to use checksums
70019ec2c48efe97e350ef4e12a373b5121673d67bc34f53ba48d7a8c659d027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.12

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

1 release file

0.1.10

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

2 release files

0.1.5

1 release file

0.1.4

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page