feat: m3u8api

This commit is contained in:
WorldObservationLog
2024-05-06 17:15:43 +08:00
parent fd78445967
commit fc43a72ebf
2 changed files with 6 additions and 3 deletions

View File

@@ -27,7 +27,10 @@ def init_client_and_lock(proxy: str, parallel_num: int):
async def get_m3u8_from_api(endpoint: str, song_id: str) -> str:
return (await client.get(endpoint, params={"songid": song_id})).text
resp = (await client.get(endpoint, params={"songid": song_id})).text
if resp == "no_found":
return ""
return resp
@retry(retry=retry_if_exception_type((httpx.TimeoutException, httpcore.ConnectError, SSLError, FileNotFoundError)),