Commit db1a0b43 authored by Konstantin Pavlov's avatar Konstantin Pavlov Committed by Jean-Baptiste Kempf

LUA: Fix MPORA playlist parser.

(cherry picked from commit 04d461bceab027028f6df19e8032e0df517f071c)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent e2dea275
...@@ -39,9 +39,8 @@ function parse() ...@@ -39,9 +39,8 @@ function parse()
if string.match( line, "image_src" ) then if string.match( line, "image_src" ) then
_,_,arturl = string.find( line, "image_src\" href=\"(.*)\" />" ) _,_,arturl = string.find( line, "image_src\" href=\"(.*)\" />" )
end end
if string.match( line, "video_src" ) then
if string.match( line, "filmID" ) then _,_,video = string.find( line, "href=\"http://video\.mpora\.com/ep/(.*).swf\" />" )
_,_,video = string.find( line, "var filmID = \'(.*)\';")
end end
end end
...@@ -68,7 +67,7 @@ function parse() ...@@ -68,7 +67,7 @@ function parse()
hd = vlc.stream("http://api.mpora.com/tv/player/playlist/vid/"..video.."/hd/true/") hd = vlc.stream("http://api.mpora.com/tv/player/playlist/vid/"..video.."/hd/true/")
page = hd:read( 65653 ) page = hd:read( 65653 )
hdurl = string.match( page, "url=\"(.*)\" />") hdurl = string.match( page, "url=\"(.*)\" />")
table.insert( p, { path = hdurl; name = name.." (HD)"; arturl = arturl } ) table.insert( p, { path = hdurl; name = name.." (HD)"; arturl = arturl; } )
end end
return p return p
......
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