2 French humor site: http://lelombrik.net
6 Copyright © 2007 the VideoLAN team
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 return vlc.access == "http"
26 and string.match( vlc.path, "lelombrik.net/videos" )
34 vlc.msg.err("Couldn't extract the video URL from lelombrik")
38 if string.match( line, "id=\"nom_fichier\">" ) then
39 title = string.gsub( line, ".*\"nom_fichier\">([^<]*).*", "%1" )
40 elseif string.match( line, "'file'" ) then
41 _,_,path = string.find( line, "'file', *'([^']*)")
42 elseif string.match( line, "flashvars=" ) then
43 path = string.gsub( line, "flashvars=.*&file=([^&]*).*", "%1" )
44 arturl = string.gsub( line, "flashvars=.*&image=([^&]*).*", "%1" )
45 elseif string.match( line, "'image'" ) then
46 _,_,arturl = string.find( line, "'image', *'([^']*)")
49 if path and arturl and title then
50 return { { path = path; arturl = arturl; title = title } }