--http://spbtvonline.ru/kanaly-tv/anekdot_tv.html --http://spbtvonline.ru/kanaly-tv/pervyi-kanal-online.html --http://spbtvonline.ru/kanaly-tv/rossiia_1.html function probe() if vlc.access ~= "http" and vlc.access ~= "https" then return false end return vlc.path:match("spbtvonline%.ru/kanaly%-tv") or vlc.path:match("tv3%.spr%.spbtv%.com") end function addParameter( url, param ) if url:match( "%?" ) then url = url .. "&" else url = url .. "?" end return url .. param end function trim1(s) return (s:gsub("^%s*(.-)%s*$", "%1")) end -- Parse function. function parse() local html = vlc.read(200000) if vlc.path:match("tv3.spr.spbtv.com") then url = "http://spbtv.cdn.spbtv.com/" .. html:match("spbtv%.cdn%.spbtv%.com/(.-)%.m3u8") .. "-inadv-qidx-1k_v2.m3u8" url = url:gsub("657%-inadv%-qidx%-1k_v2", "657%-2064k") url = url:gsub("514%-inadv%-qidx%-1k_v2", "514%-2064k") url = url:gsub("515%-inadv%-qidx%-1k_v2", "515%-2064k") title = vlc.path:match("title=([^&]+)" ) img = vlc.path:match("poster=([^&]+)") if not url then vlc.msg.err("Couldn't find url to stream in the "..vlc.access.."://"..vlc.path) end if title then title = vlc.strings.decode_uri(title) end if img then img = vlc.strings.decode_uri(img ) end else urlid = html:match("'#ch_(.-)'%)%.addClass" ) title = html:match("