mirror of
https://github.com/JefferyHcool/BiliNote.git
synced 2026-05-10 17:43:40 +08:00
feat(downloaders): 更新 Bilibili 和 YouTube 下载器格式选择- 将 Bilibili 和 YouTube 下载器的格式选择从视频格式更改为音频格式
-优先选择 m4a 格式的最佳音频,如果没有可用的 m4a 格式,则选择最佳音频格式 - 如果没有可用的音频格式,则选择最佳格式
This commit is contained in:
@@ -69,7 +69,7 @@ class BilibiliDownloader(Downloader, ABC):
|
||||
output_path = os.path.join(output_dir, "%(id)s.%(ext)s")
|
||||
|
||||
ydl_opts = {
|
||||
'format': 'best[height<=480][ext=mp4]/best[height<=480]/best',
|
||||
'format': 'bestaudio[ext=m4a]/bestaudio/best',
|
||||
'outtmpl': output_path,
|
||||
'noplaylist': True,
|
||||
'quiet': False,
|
||||
|
||||
@@ -30,7 +30,7 @@ class YoutubeDownloader(Downloader, ABC):
|
||||
output_path = os.path.join(output_dir, "%(id)s.%(ext)s")
|
||||
|
||||
ydl_opts = {
|
||||
'format': 'best[height<=480][ext=mp4]/best[height<=480]/best',
|
||||
'format': 'bestaudio[ext=m4a]/bestaudio/best',
|
||||
'outtmpl': output_path,
|
||||
'noplaylist': True,
|
||||
'quiet': False,
|
||||
|
||||
Reference in New Issue
Block a user