Commit 18453ab2 authored by Rafaël Carré's avatar Rafaël Carré

lua demuxer: update googlevideo

parent 0d358e7b
......@@ -9,7 +9,17 @@ end
-- Parse function.
function parse()
-- We don't need to get the meta data here since it'll be available in
-- the GVP file.
return { { path = string.gsub( vlc.path, "^.*(docid=[^&]*).*$", "http://video.google.com/videogvp?%1" ) } }
while true
do
line = vlc.readline()
if not line then break end
if string.match( line, "^<title>" ) then
title = string.gsub( line, "<title>([^<]*).*", "%1" )
end
if string.match( line, "src=\"/googleplayer.swf" ) then
url = string.gsub( line, ".*videoUrl=([^&]*).*" ,"%1" )
arturl = string.gsub( line, ".*thumbnailUrl=([^\"]*).*", "%1" )
return { { path = vlc.decode_uri(url), title = title, arturl = vlc.decode_uri(arturl) } }
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment