ydl_opts = {
'format': 'bestaudio/best',
'noplaylist': False if not url.startswith("ytsearch:") else True,
'quiet': True,
'postprocessors': [{
'key': 'FFmpegExtractAudio',
'preferredcodec': 'mp3',
'preferredquality': '192',
}],
'nocheckcertificate': True,
'ignoreerrors': True,
'geo_bypass': True,
'geo_bypass_country': 'RU',
'coookiefile': 'database/System/cookies.txt'
}
但歌曲没有播放并出现错误:
错误:[youtube] HfpUyI_3lHk:登录以确认您的年龄。该视频可能不适合某些用户观看。使用 --cookies-from-browser 或者 --cookies 进行身份验证。请参阅 https://github.com/yt-dlp/yt-dlp/wiki/FAQ#how-do-i-pass-cookies-to-yt-dlp 了解如何手动传递 cookie。另请参阅 https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies ,获取有关有效导出 YouTube cookies 的提示
我通过浏览器中打开的 YouTube 并使用授权的 YouTube 帐户接收了套接字。
该怎么办?或许ydl_opts
是设置不正确?