Greasy Fork is available in English.

Play with MPV

Play videos and songs on the website via mpv-handler

< Feedback on Play with MPV

Question/comment

§
Posted: 27-09-2023
Edited: 27-09-2023

大佬你好,新版 yt-dlp.exe 无法读取 cookies,
能不能手动填写 cookies 文件位置啊,我下好 cookies 文件了,
谢过大大

§
Posted: 27-09-2023

ytdl_hook: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Administrator\\AppData\\Local\\Google\\Chrome\\User Data\\Default\\Network\\Cookies'
ytdl_hook: [29956] Failed to execute script '__main__' due to unhandled exception!
ytdl_hook: youtube-dl failed: unexpected error occurred

akiiruiAuthor
§
Posted: 30-09-2023
Edited: 30-09-2023

mpv-handler 没有使用 --cookies-from-browser 这个功能获取 cookies,一直都是传递 cookies 文件使用的。 但是你的报错内容似乎是yt-dlp在直接读取 Chrome 的 cookies。 请检查你的 yt-dlp.conf 或者 mpv.conf 如果你有配置相关配置项,删除掉。

然后 mpv-handler 使用cookies的方式如下:

Try Pass cookies (传递 cookies) 供高级用户播放仅限会员的视频。

因为用户脚本没有权限读取所有的 cookies (例如 HttpOnly 的 cookies),所以只能手动导出 cookies。

打开设置,将 Try Pass Cookies 切换为 Yes。 手动导出 cookies (Chromium, Firefox)。 Cookies 必须导出至以下位置:

Linux:

$HOME/.config/mpv-handler/cookies/ Windows:

(mpv-hander.exe 的父目录)\cookies\ Cookies 的文件名必须遵循以下格式:

www.youtube.com.txt (如果视频的链接是这样:https://www.youtube.com/watch?v=BUOmDL1L4XU,取域名部分,拓展名为 txt)

§
Posted: 02-10-2023

感谢大大分析,已经解决

Post reply

Sign in to post a reply.