Files
pcs_live/example.py

17 lines
385 B
Python
Raw Normal View History

2026-05-30 18:39:09 +01:00
from pcslive import LiveStats
import time
2026-05-30 18:39:09 +01:00
stats = LiveStats()
if len(stats.races) > 0:
race = stats.races[0]
print("Latest timeline update from", race.title, ":")
last_update = ""
while True:
race.get_timeline()
if last_update != race.timeline[0]:
print(race.timeline[0])
last_update = race.timeline[0]
time.sleep(10)