Spaces:
Paused
Paused
Update test.py
Browse files
test.py
CHANGED
|
@@ -22,7 +22,7 @@ async def clone_m3u8(d: str = None):
|
|
| 22 |
try:
|
| 23 |
d = unquote(d)
|
| 24 |
m3u8_content = fetch_m3u8(d)
|
| 25 |
-
return
|
| 26 |
except requests.RequestException as e:
|
| 27 |
print(f"Failed to fetch M3U8 file: {e}")
|
| 28 |
raise HTTPException(status_code=404, detail="M3U8 content not found")
|
|
|
|
| 22 |
try:
|
| 23 |
d = unquote(d)
|
| 24 |
m3u8_content = fetch_m3u8(d)
|
| 25 |
+
return StreamingResponse(content=m3u8_content, media_type='application/x-mpegURL')
|
| 26 |
except requests.RequestException as e:
|
| 27 |
print(f"Failed to fetch M3U8 file: {e}")
|
| 28 |
raise HTTPException(status_code=404, detail="M3U8 content not found")
|