hi all,
I have a problem with this function
does not give accurate results
Must return connection and signature here :

sorry for my bad english :((
I have a problem with this function
function ExtractYouTube()
local sBody = GetBody(Input.GetText("name_input"));
local url_map = string.match( sBody, "\"url_encoded_fmt_stream_map\": \"(.-)\"" );
url_map = string.gsub( url_map, "\\u0026", "&" );
for stream in string.gmatch( url_map, "[^,]+" ) do
local url = string.match( stream, "url=([^&,]+)" );
local sig = string.match( stream, "s=([^&,]+)" );
if ( string.find(unescape(url), "itag=137") ) then
return unescape(url).."&signature="..sig;
else
local url_map = string.match( sBody, "adaptive_fmts\": \"(.-)\"" );
url_map = string.gsub( url_map, "\\u0026", "&" );
for stream in string.gmatch( url_map, "[^,]+" ) do
local url = string.match( stream, "url=([^&,]+)" );
local sig = string.match( stream, "s=([^&,]+)" );
if ( string.find(unescape(url), "itag=137") ) then
return unescape(url).."&signature="..sig;
end
end
end
end
end
Must return connection and signature here :

sorry for my bad english :((