Commit 7292c475 authored by Rafaël Carré's avatar Rafaël Carré

Fixes youtube parsing

parent 6dd4b20e
...@@ -32,9 +32,12 @@ function parse() ...@@ -32,9 +32,12 @@ function parse()
if string.match( line, "subscribe_to_user=" ) then if string.match( line, "subscribe_to_user=" ) then
artist = string.gsub( line, ".*subscribe_to_user=([^&]*).*", "%1" ) artist = string.gsub( line, ".*subscribe_to_user=([^&]*).*", "%1" )
end end
if name and description and artist then break end if string.match( line, "player2.swf" ) then
video_id = string.gsub( line, ".*BASE_YT_URL=http://youtube.com/&video_id=([^\"]*).*", "%1" )
end end
return { { path = string.gsub( vlc.path, "^(.*)watch%?v=([^&]*).*$", "http://%1v/%2" ); name = name; description = description; artist = artist } } if name and description and artist and video_id then break end
end
return { { path = "http://www.youtube.com/get_video.php?video_id="..video_id; name = name; description = description; artist = artist } }
else -- This is the flash player's URL else -- This is the flash player's URL
if string.match( vlc.path, "title=" ) then if string.match( vlc.path, "title=" ) then
name = get_url_param( vlc.path, "title" ) name = get_url_param( vlc.path, "title" )
......
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