fix streamhub scraping
misc edits
This commit is contained in:
doms9 2025-12-15 15:53:36 -05:00
parent 86a88e206e
commit 00000d9ebc
7 changed files with 33 additions and 29 deletions

View file

@ -17,12 +17,10 @@ BASE_URL = "https://streamfree.to/"
async def refresh_api_cache(client: httpx.AsyncClient) -> dict[str, dict[str, list]]:
try:
url = urljoin(BASE_URL, "streams")
r = await client.get(url)
r = await client.get(urljoin(BASE_URL, "streams"))
r.raise_for_status()
except Exception as e:
log.error(f'Failed to fetch "{url}": {e}')
log.error(f'Failed to fetch "{r.url}": {e}')
return {}