Giter VIP home page Giter VIP logo

procyclingstats-fork's Introduction

procyclingstats

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, 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!

Links

procyclingstats-fork's People

Contributors

themm1 avatar baronet2 avatar robclaessensrhdhv avatar leapingllamas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.