test
This commit is contained in:
parent
122d7b6ffe
commit
f7239a90f1
@ -69,12 +69,10 @@ class dropout():
|
||||
'writesubtitles': True, # Download subtitles
|
||||
'subtitleslangs': ['en'] # Specify the language for subtitles (e.g., 'en' for English)
|
||||
}
|
||||
try:
|
||||
with yt_dlp.YoutubeDL(dl_ops) as ydl:
|
||||
ydl.download([url])
|
||||
return JSONResponse(status_code=200, content={"status": "success", "message": "Download completed."})
|
||||
except Exception as e:
|
||||
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
|
||||
with yt_dlp.YoutubeDL(dl_ops) as ydl:
|
||||
ydl.download([url])
|
||||
|
||||
|
||||
|
||||
def series():
|
||||
json_data=[]
|
||||
|
||||
@ -32,7 +32,11 @@ async def dropoutSeries():
|
||||
|
||||
@app.post("/dropoutDownload")
|
||||
async def dropoutDownload(show: str, season: str, episode: str = None):
|
||||
download.dropout.show(show,season,episode)
|
||||
try:
|
||||
download.dropout.show(show,season,episode)
|
||||
return JSONResponse(status_code=200, content={"status": "success", "message": "Series downloading."})
|
||||
except Exception as e:
|
||||
return JSONResponse(status_code=500, content={"status": "error", "message": str(e)})
|
||||
|
||||
@app.post("/ydl")
|
||||
async def ydl(url: str, location: str):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user