diff --git a/M3U8/scrapers/roxie.py b/M3U8/scrapers/roxie.py index 8f0d07a..3d502f8 100644 --- a/M3U8/scrapers/roxie.py +++ b/M3U8/scrapers/roxie.py @@ -22,7 +22,7 @@ SPORT_URLS = { CACHE_FILE = Cache(Path(__file__).parent / "caches" / "roxie.json", exp=10_800) -HTML_CACHE = Cache(Path(__file__).parent / "caches" / "roxie_html.json", exp=86_400) +HTML_CACHE = Cache(Path(__file__).parent / "caches" / "roxie_html.json", exp=28_800) async def process_event( @@ -51,7 +51,7 @@ async def process_event( wait_task = asyncio.create_task(got_one.wait()) try: - await asyncio.wait_for(wait_task, timeout=6) + await asyncio.wait_for(wait_task, timeout=15) except asyncio.TimeoutError: log.warning(f"URL {url_num}) Timed out waiting for M3U8.") return @@ -107,7 +107,8 @@ async def refresh_html_cache( event = a_tag.text(strip=True) - event_link = a_tag.attributes.get("href") + if not (event_link := a_tag.attributes.get("href")): + continue if not (span := row.css_first("span.countdown-timer")): continue