[tools] youtube-dl 使用
同时也建议使用 yt-dlp
--cookies 选项
该选项是设置 cookie 文件的,比如 youtube-dl https://Youtu.com/xxx --cookies ~/cookies.txt
。
需要注意的是 cookie 文件的格式(参考代码仓库源 test/testdata/cookies/httponly_cookies.txt),且该文件头部需要加入如下的注释:
格式说明见 https://everything.curl.dev/http/cookies/fileformat
建议使用https://github.com/kairi003/Get-cookies.txt-LOCALLY
扩展一键获取
# Netscape HTTP Cookie File
# http://curl.haxx.se/rfc/cookie_spec.html