3 Copyright © 2009 the VideoLAN team
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 if vlc.access ~= "http" and vlc.access ~= "https" then
25 koreus_site = string.match( vlc.path, "koreus" )
26 if not koreus_site then
29 return ( string.match( vlc.path, "video" ) ) -- http://www.koreus.com/video/pouet.html
36 if not line then break end
37 if string.match( line, "<meta name=\"title\"" ) then
38 _,_,name = string.find( line, "content=\"(.-)\"" )
39 name = vlc.strings.resolve_xml_special_chars( name )
41 if string.match( line, "<meta name=\"description\"" ) then
42 _,_,description = string.find( line, "content=\"(.-)\"" )
43 if (description ~= nil) then
44 description = vlc.strings.resolve_xml_special_chars( description )
47 if string.match( line, "<meta name=\"author\"" ) then
48 _,_,artist = string.find( line, "content=\"(.-)\"" )
49 artist = vlc.strings.resolve_xml_special_chars( artist )
51 if string.match( line, "link rel=\"image_src\"" ) then
52 _,_,arturl = string.find( line, "href=\"(.-)\"" )
55 vid_url = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.mp4)' )
60 vid_url_hd = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%-hd%.mp4)' )
62 path_url_hd = vid_url_hd
65 vid_url_webm = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.webm)' )
67 path_url_webm = vid_url_webm
70 vid_url_flv = string.match( line, '(http://embed%.koreus%.com/%d+/%d+/[%w-]*%.flv)' )
72 path_url_flv = vid_url_flv
78 return { { path = path_url_hd; name = name; description = description; artist = artist; arturl = arturl } }
80 return { { path = path_url; name = name; description = description; artist = artist; arturl = arturl } }
81 elseif path_url_webm then
82 return { { path = path_url_webm; name = name; description = description; artist = artist; arturl = arturl } }
83 elseif path_url_flv then
84 return { { path = path_url_flv; name = name; description = description; artist = artist; arturl = arturl } }