-- $Id$ -- Helper function to get a parameter's value in a URL function get_url_param( url, name ) return string.gsub( vlc.path, "^.*"..name.."=([^&]*).*$", "%1" ) end -- Probe function. function probe() return vlc.access == "http" and string.match( vlc.path, "youtube.com" ) and ( string.match( vlc.path, "watch%?v=" ) or string.match( vlc.path, "watch_fullscreen%?video_id=" ) or string.match( vlc.path, "p.swf" ) or string.match( vlc.path, "player2.swf" ) ) end -- Parse function. function parse() if string.match( vlc.path, "watch%?v=" ) then -- This is the HTML page's URL while true do -- Try to find the video's title line = vlc.readline() if not line then break end if string.match( line, "