2026-05-30 15:58:26 +00:00
|
|
|
# pcs_live
|
|
|
|
|
|
2026-05-30 18:39:09 +01:00
|
|
|
scrapes procyclingstats livestats for use elsewhere
|
|
|
|
|
|
|
|
|
|
# setup (windows)
|
|
|
|
|
|
|
|
|
|
after cloning set up a virtualenv
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
py -3 -m venv .venv
|
|
|
|
|
.venv\Scripts\activate
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
you may need to run this first before activating the virtualenv
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Set-ExecutionPolicy Unrestricted -Force
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
install dependencies
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
pip install beautifulsoup4
|
|
|
|
|
pip install requests
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# usage
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
from pcslive import LiveStats
|
|
|
|
|
|
|
|
|
|
stats = LiveStats()
|
|
|
|
|
stats.print_races()
|
|
|
|
|
```
|
|
|
|
|
|