0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-19 19:42:24 +02:00

ytdl_hook: strip quotes from cookie values

This commit is contained in:
bashonly 2024-06-28 03:06:56 +00:00 committed by Dudemanguy
parent 7c70df0934
commit e78e2c73cf

View File

@ -180,7 +180,7 @@ end
local function serialize_cookies_for_avformat(cookies)
local result = ''
for _, cookie in pairs(cookies) do
local cookie_str = ('%s=%s; '):format(cookie.name, cookie.value)
local cookie_str = ('%s=%s; '):format(cookie.name, cookie.value:gsub('^"(.+)"$', '%1'))
for k, v in pairs(cookie) do
if k ~= "name" and k ~= "value" then
cookie_str = cookie_str .. ('%s=%s; '):format(k, v)