2026-05-30 21:43:47 +01:00
|
|
|
from pcslive import LiveStats
|
|
|
|
|
import time
|
|
|
|
|
|
|
|
|
|
stats = LiveStats()
|
|
|
|
|
|
|
|
|
|
# if there are live races...
|
|
|
|
|
if len(stats.races) > 0:
|
|
|
|
|
race = stats.races[0] # just grab the first one for example's sake
|
|
|
|
|
print("Latest timeline update from", race.title, ":")
|
|
|
|
|
|
|
|
|
|
race.get_timeline()
|
|
|
|
|
|
|
|
|
|
# prints in reverse so you dont have to scroll up to the most recent :P
|
|
|
|
|
count = len(race.timeline) - 1
|
|
|
|
|
for item in race.timeline:
|
2026-05-30 22:28:29 +00:00
|
|
|
print(race.timeline[count])
|
2026-05-30 21:43:47 +01:00
|
|
|
print("===================")
|
|
|
|
|
count -= 1
|