๐Ÿ“… Calendar file generator for triathlonlive.tv upcoming events triathlon-live-calendar.fly.dev
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Localizes datetimes for logging

+4 -1
+4 -1
triathlon_live_calendar/scraper.py
··· 1 1 from datetime import timedelta 2 2 from hashlib import md5 3 3 from re import compile, findall 4 + from time import tzname 4 5 from typing import Optional, Tuple 5 6 6 7 from arrow import get # type: ignore ··· 34 35 title = title.text.strip() 35 36 36 37 if logger: 37 - logger.info((f"Parsed {url}", f" Title: {title}", f" Begin: {begin}")) 38 + tz, *_ = tzname 39 + local = begin.to(tz).format(DATETIME_FORMAT[:-2]) 40 + logger.info((f"Parsed {url}", f" Title: {title}", f" Begin: {local}")) 38 41 39 42 return Event( 40 43 name=title,