This commit is contained in:
parent
86fb2ab156
commit
a1e9bb6330
@ -74,10 +74,8 @@ class YtService(_Service):
|
|||||||
ydl_opts["outtmpl"] = file_path.rsplit(".", 1)[0] + ".mp3"
|
ydl_opts["outtmpl"] = file_path.rsplit(".", 1)[0] + ".mp3"
|
||||||
|
|
||||||
with YoutubeDL(ydl_opts) as ydl:
|
with YoutubeDL(ydl_opts) as ydl:
|
||||||
url = info.get('webpage_url')
|
dl = get_suitable_downloader(info)(ydl, ydl_opts)
|
||||||
if not url:
|
dl.download(file_path, info)
|
||||||
raise errors.ServiceError("No URL provided for download")
|
|
||||||
ydl.download([url])
|
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.error(f"Download error: {str(e)}", exc_info=True)
|
logging.error(f"Download error: {str(e)}", exc_info=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user