- edit domain for watchfooty.py
- misc edits
This commit is contained in:
doms9 2026-03-07 11:52:59 -05:00
parent 7e924aa3a9
commit 00000d9379
2 changed files with 15 additions and 20 deletions

View file

@ -17,19 +17,19 @@ CACHE_FILE = Cache(TAG, exp=10_800)
HTML_CACHE = Cache(f"{TAG}-html", exp=19_800)
BASE_URL = "https://livesports4u.net"
BASE_URL = "https://streamhub.pro"
SPORT_ENDPOINTS = [
f"sport_{sport_id}"
for sport_id in [
# "68c02a4465113", # American Football
"68c02a446582f", # Baseball
# "68c02a446582f", # Baseball
"68c02a4466011", # Basketball
"68c02a4466f56", # Hockey
"68c02a44674e9", # MMA
"68c02a4467a48", # Racing
# "68c02a44674e9", # MMA
# "68c02a4467a48", # Racing
"68c02a4464a38", # Soccer
"68c02a4468cf7", # Tennis
# "68c02a4468cf7", # Tennis
]
]
@ -107,7 +107,7 @@ async def get_events(cached_keys: list[str]) -> list[dict[str, str]]:
now.timestamp(),
)
for date in [now.date(), now.delta(days=1).date()]
for sport_id in SPORT_ENDPOINTS.values()
for sport_id in SPORT_ENDPOINTS
]
results = await asyncio.gather(*tasks)
@ -193,6 +193,8 @@ async def scrape(browser: Browser) -> None:
if url:
valid_count += 1
entry["url"] = url.split("?")[0]
urls[key] = entry
log.info(f"Collected and cached {valid_count - cached_count} new event(s)")