5 return vlc.access == "http"
6 and string.match( vlc.path, "metacafe.com" )
7 and ( string.match( vlc.path, "watch/" )
8 or string.match( vlc.path, "mediaURL=" ) )
13 if string.match( vlc.path, "watch/" )
14 then -- This is the HTML page's URL
16 -- Try to find the video's title
18 if not line then break end
19 if string.match( line, "<meta name=\"title\"" ) then
20 name = string.gsub( line, "^.*content=\"Metacafe %- ([^\"]*).*$", "%1" )
22 if string.match( line, "<meta name=\"description\"" ) then
23 description = string.gsub( line, "^.*content=\"([^\"]*).*$", "%1" )
25 if string.match( line, "<link rel=\"image_src\"" ) then
26 arturl = string.gsub( line, "^.*href=\"([^\"]*)\".*$", "%1" )
28 if name and description and arturl then break end
30 return { { path = string.gsub( vlc.path, "^.*watch/(.*[^/])/?$", "http://www.metacafe.com/fplayer/%1.swf" ); name = name; description = description; arturl = arturl; } }
31 else -- This is the flash player's URL
32 return { { path = string.gsub( vlc.path, "^.*mediaURL=([^&]*).*$", "%1" ) } }