Commit cb7cc6e8 authored by Antoine Cellerier's avatar Antoine Cellerier

Fix the url translation

parent e943c000
-- $Id$ -- $Id$
--[[
Translate Daily Motion video webpages URLs to the corresponding
FLV URL.
--]]
-- Probe function. -- Probe function.
function probe() function probe()
return vlc.access == "http" return vlc.access == "http"
...@@ -13,9 +18,11 @@ function parse() ...@@ -13,9 +18,11 @@ function parse()
do do
line = vlc.readline() line = vlc.readline()
if not line then break end if not line then break end
if string.match( line, "param name=\"flashvars\" value=\"url=" ) if string.match( line, "param name=\"flashvars\" value=\".*url=" )
then then
path = vlc.decode_uri( string.gsub( line, "^.*param name=\"flashvars\" value=\"url=([^&]*).*$", "%1" ) ) vlc.msg_err( "Tada!" )
path = vlc.decode_uri( string.gsub( line, "^.*param name=\"flashvars\" value=\".*url=([^&]*).*$", "%1" ) )
vlc.msg_err( path )
end end
--[[ if string.match( line, "<title>" ) --[[ if string.match( line, "<title>" )
then then
......
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