Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
import sys
|
| 2 |
import time
|
| 3 |
-
from fastapi import FastAPI, BackgroundTasks, Request, HTTPException, Security
|
| 4 |
from fastapi.security import APIKeyHeader
|
| 5 |
from fastapi.responses import FileResponse
|
| 6 |
from fastapi.concurrency import run_in_threadpool
|
|
@@ -309,8 +309,7 @@ async def download_high_quality_video(request: Request):
|
|
| 309 |
if is_youtube_url:
|
| 310 |
dl_url = await get_track_download_url(video_url)
|
| 311 |
if dl_url and "http" in dl_url:
|
| 312 |
-
|
| 313 |
-
return jsonify(result)
|
| 314 |
else:
|
| 315 |
return {
|
| 316 |
"error": "Failed to Fetch the video."
|
|
|
|
| 1 |
import sys
|
| 2 |
import time
|
| 3 |
+
from fastapi import FastAPI, BackgroundTasks, Request, HTTPException, Security
|
| 4 |
from fastapi.security import APIKeyHeader
|
| 5 |
from fastapi.responses import FileResponse
|
| 6 |
from fastapi.concurrency import run_in_threadpool
|
|
|
|
| 309 |
if is_youtube_url:
|
| 310 |
dl_url = await get_track_download_url(video_url)
|
| 311 |
if dl_url and "http" in dl_url:
|
| 312 |
+
return {"url": dl_url}
|
|
|
|
| 313 |
else:
|
| 314 |
return {
|
| 315 |
"error": "Failed to Fetch the video."
|