e
This commit is contained in:
parent
00000d91bb
commit
00000d9a4d
6 changed files with 13 additions and 24 deletions
|
|
@ -18,7 +18,7 @@ HTML_CACHE = Cache("roxie-html.json", exp=19_800)
|
|||
|
||||
BASE_URL = "https://roxiestreams.live"
|
||||
|
||||
valid_sports = {
|
||||
SPORT_ENDPOINTS = {
|
||||
"fighting": "Fighting",
|
||||
"mlb": "MLB",
|
||||
"motorsports": "Racing",
|
||||
|
|
@ -90,7 +90,7 @@ async def refresh_html_cache(
|
|||
|
||||
event_dt = Time.from_str(data_start, timezone="PST")
|
||||
|
||||
event_sport = valid_sports[sport]
|
||||
event_sport = SPORT_ENDPOINTS[sport]
|
||||
|
||||
key = f"[{event_sport}] {event} ({TAG})"
|
||||
|
||||
|
|
@ -156,7 +156,7 @@ async def scrape(client: httpx.AsyncClient) -> None:
|
|||
|
||||
log.info(f'Scraping from "{BASE_URL}"')
|
||||
|
||||
sport_urls = {sport: urljoin(BASE_URL, sport) for sport in valid_sports}
|
||||
sport_urls = {sport: urljoin(BASE_URL, sport) for sport in SPORT_ENDPOINTS}
|
||||
|
||||
events = await get_events(
|
||||
client,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue