e
This commit is contained in:
parent
d7c64fdeae
commit
00000d94fc
8 changed files with 38 additions and 33 deletions
|
|
@ -16,7 +16,7 @@ CACHE_FILE = Cache("roxie.json", exp=10_800)
|
|||
|
||||
HTML_CACHE = Cache("roxie-html.json", exp=19_800)
|
||||
|
||||
MIRRORS = ["https://roxiestreams.live", "https://roxiestreams.cc"]
|
||||
BASE_URL = "https://roxiestreams.live"
|
||||
|
||||
|
||||
async def process_event(
|
||||
|
|
@ -143,15 +143,10 @@ async def scrape(client: httpx.AsyncClient) -> None:
|
|||
|
||||
log.info(f"Loaded {cached_count} event(s) from cache")
|
||||
|
||||
if not (base_url := await network.get_base(MIRRORS)):
|
||||
log.warning("No working Roxie mirrors")
|
||||
CACHE_FILE.write(cached_urls)
|
||||
return
|
||||
|
||||
log.info(f'Scraping from "{base_url}"')
|
||||
log.info(f'Scraping from "{BASE_URL}"')
|
||||
|
||||
sport_urls = {
|
||||
sport: urljoin(base_url, sport.lower())
|
||||
sport: urljoin(BASE_URL, sport.lower())
|
||||
for sport in ["Soccer", "MLB", "NBA", "NFL", "Fighting", "Motorsports"]
|
||||
}
|
||||
|
||||
|
|
@ -188,7 +183,7 @@ async def scrape(client: httpx.AsyncClient) -> None:
|
|||
entry = {
|
||||
"url": url,
|
||||
"logo": logo,
|
||||
"base": base_url,
|
||||
"base": BASE_URL,
|
||||
"timestamp": ts,
|
||||
"id": tvg_id or "Live.Event.us",
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue