Update app.py
Browse files
app.py
CHANGED
|
@@ -285,6 +285,11 @@ def jio_fetch(url: str) -> str:
|
|
| 285 |
logger.error(f"Error while fetching {url}: {e}")
|
| 286 |
raise HTTPException(status_code=500, detail=f"An error occurred while fetching: {str(e)}")
|
| 287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
|
| 289 |
@app.post("/jio_dl")
|
| 290 |
async def jio_download(request: JioDownloadRequest):
|
|
|
|
| 285 |
logger.error(f"Error while fetching {url}: {e}")
|
| 286 |
raise HTTPException(status_code=500, detail=f"An error occurred while fetching: {str(e)}")
|
| 287 |
|
| 288 |
+
|
| 289 |
+
# Define the request model
|
| 290 |
+
class JioDownloadRequest(BaseModel):
|
| 291 |
+
url: str
|
| 292 |
+
quality: str
|
| 293 |
|
| 294 |
@app.post("/jio_dl")
|
| 295 |
async def jio_download(request: JioDownloadRequest):
|