Commit 04d461bc authored by Konstantin Pavlov's avatar Konstantin Pavlov

LUA: Fix MPORA playlist parser.

parent a1fdfd70
...@@ -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