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:
.. code-block:: text
$ pip install procyclingstats
Manual (for development):
.. code-block:: text
$ git clone https://github.com/themm1/procyclingstats.git
$ pip install -r procyclingstats/requirements_dev.txt
Basic usage
-----------
Basic Rider class usage:
.. code-block:: text
>>> 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
-----
- GitHub_
- PyPI_
- Documentation_
.. _GitHub: https://github.com/themm1/procyclingstats
.. _PyPI: https://pypi.org/project/procyclingstats
.. _Documentation: https://procyclingstats.readthedocs.io/en/latest
.. _procyclingstats.com: https://www.procyclingstats.com
.. _selectolax: https://github.com/rushter/selectolax
.. _issues: https://github.com/themm1/procyclingstats/issues
Raw data
{
"_id": null,
"home_page": "https://github.com/themm1/procyclingstats",
"name": "procyclingstats",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "cycling cycling-stats procyclingstats scraper html-parsing sports-analytics",
"author": "Martin Madzin",
"author_email": "madzin.m@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1e/f9/0753b13ad29f4f4d6c8ff94d7b9cd142188c64cee7fd3d44ee99a6722e8d/procyclingstats-0.2.1.tar.gz",
"platform": null,
"description": "procyclingstats\n===============\n\nProcyclingstats is a Python package for scraping `procyclingstats.com`_,\nwhich is a website with cycling stats. It's recommended to get familiar with\nthe website before using this package.\n\nInstallation\n------------\n\nUsing pip:\n\n.. code-block:: text\n\n $ pip install procyclingstats\n\nManual (for development):\n\n.. code-block:: text\n\n $ git clone https://github.com/themm1/procyclingstats.git\n $ pip install -r procyclingstats/requirements_dev.txt\n\nBasic usage\n-----------\n\nBasic Rider class usage:\n\n.. code-block:: text\n\n >>> from procyclingstats import Rider\n >>> rider = Rider(\"rider/tadej-pogacar\")\n >>> rider.birthdate()\n \"1998-9-21\"\n >>> rider.parse()\n {\n 'birthdate': '1998-9-21',\n 'height': 1.76,\n 'name': 'Tadej Poga\u010dar',\n 'nationality': 'SI',\n ...\n }\n\nInterface consists from scraping classes which are currently ``Race``,\n``RaceStartlist``, ``RaceClimbs``, ``Ranking``, ``Rider``, ``RiderResults``,\n``Stage`` and ``Team``. Usage of all scraping classes is almost the same and\nthe only difference among them are parsing methods as is for example\n``birthdate`` in Rider class usage example.\n\nUnexpected behaviour and parsing errors\n---------------------------------------\n\nSince the project is a web scraper which parses HTML, it's difficult to make\nit reliable and it's common to encounter some HTML parsing problems. After\ngetting some kind of unexpected behaviour or parsing errors, it's recommended\nto update the package on your system using\n``pip install procyclingstats --upgrade``. If the problem proceeds, see the\nGitHub issues_ page and if the issue hasn't been opened yet, don't hesitate to\nopen one!\n\nLinks\n-----\n\n- GitHub_\n- PyPI_\n- Documentation_\n\n.. _GitHub: https://github.com/themm1/procyclingstats\n.. _PyPI: https://pypi.org/project/procyclingstats\n.. _Documentation: https://procyclingstats.readthedocs.io/en/latest\n.. _procyclingstats.com: https://www.procyclingstats.com\n.. _selectolax: https://github.com/rushter/selectolax\n.. _issues: https://github.com/themm1/procyclingstats/issues\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python API wrapper for procyclingstats.com",
"version": "0.2.1",
"project_urls": {
"Homepage": "https://github.com/themm1/procyclingstats"
},
"split_keywords": [
"cycling",
"cycling-stats",
"procyclingstats",
"scraper",
"html-parsing",
"sports-analytics"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3d78b84f6e203e07373156cd59080317625d14341c6f617d5e563386ead838f3",
"md5": "bc6bf1de2d59a5747e6a4c037d2a7d03",
"sha256": "9afdc60b9f823dfdfd81fdab2cad56ab4376a44045eae50a9ffc01c26757ed8c"
},
"downloads": -1,
"filename": "procyclingstats-0.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bc6bf1de2d59a5747e6a4c037d2a7d03",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 34189,
"upload_time": "2024-08-28T11:28:10",
"upload_time_iso_8601": "2024-08-28T11:28:10.221112Z",
"url": "https://files.pythonhosted.org/packages/3d/78/b84f6e203e07373156cd59080317625d14341c6f617d5e563386ead838f3/procyclingstats-0.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ef90753b13ad29f4f4d6c8ff94d7b9cd142188c64cee7fd3d44ee99a6722e8d",
"md5": "9d445bf742930e9357257db8cf7a6f10",
"sha256": "d9d890e87faf74cae948a319bcd21f0b6d56b93936176c70a73ce65be159dd79"
},
"downloads": -1,
"filename": "procyclingstats-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "9d445bf742930e9357257db8cf7a6f10",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 27601,
"upload_time": "2024-08-28T11:28:11",
"upload_time_iso_8601": "2024-08-28T11:28:11.314301Z",
"url": "https://files.pythonhosted.org/packages/1e/f9/0753b13ad29f4f4d6c8ff94d7b9cd142188c64cee7fd3d44ee99a6722e8d/procyclingstats-0.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-28 11:28:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "themm1",
"github_project": "procyclingstats",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "procyclingstats"
}