diff options
author | Nigel Taylor <njtaylor0101@gmail.com> | 2012-09-30 13:06:50 +0100 |
---|---|---|
committer | Nigel Taylor <njtaylor0101@gmail.com> | 2012-09-30 13:06:50 +0100 |
commit | 78c8cc661c5fa4b389600648482aa35fc6d10030 (patch) | |
tree | 951db3ea7cd5f7b350e5bd78ee59992e4b152b0f | |
parent | 75cf3ca858c229a39c0cf0a991e449de51560ed2 (diff) | |
parent | d70e064a3756a5f0a18d4c0ce4d1d744e3037218 (diff) | |
download | get-flash-videos-78c8cc661c5fa4b389600648482aa35fc6d10030.tar.gz |
Merge branch 'master' of https://github.com/karjonas/get-flash-videos
-rw-r--r-- | lib/FlashVideo/Site/Svtplay.pm | 6 | ||||
-rw-r--r-- | lib/FlashVideo/Site/Tv3play.pm | 12 |
2 files changed, 8 insertions, 10 deletions
diff --git a/lib/FlashVideo/Site/Svtplay.pm b/lib/FlashVideo/Site/Svtplay.pm index b5c682a..56e3ec1 100644 --- a/lib/FlashVideo/Site/Svtplay.pm +++ b/lib/FlashVideo/Site/Svtplay.pm @@ -6,6 +6,7 @@ use warnings; use FlashVideo::Utils; use FlashVideo::JSON; +use HTML::Entities; sub find_video { my ($self, $browser, $embed_url, $prefs) = @_; @@ -14,10 +15,10 @@ sub find_video { if ($browser->uri->as_string !~ m/video\/([0-9]*)/) { die "No video id found in url"; } - my $video_id = $1; + $browser->content =~ m/<title>(.+)<\/title>/; + my $name = decode_entities($1); my $info_url = "http://www.svtplay.se/video/$video_id?output=json"; - $browser->get($info_url); if (!$browser->success) { @@ -25,7 +26,6 @@ sub find_video { } my $video_data = from_json($browser->content); - my $name = $video_data->{context}->{title}; my $bitrate = 0; my $rtmp_url; diff --git a/lib/FlashVideo/Site/Tv3play.pm b/lib/FlashVideo/Site/Tv3play.pm index c11e060..312a9fa 100644 --- a/lib/FlashVideo/Site/Tv3play.pm +++ b/lib/FlashVideo/Site/Tv3play.pm @@ -68,13 +68,11 @@ sub find_video_viasat { }; - return{ - rtmp => $rtmp, - swfVfy => "http://flvplayer-viastream-viasat-tv.origin.vss.viasat.tv/play/swf/player110420.swf", - flv => $flv_filename - }; - - + return { + rtmp => $rtmp, + swfVfy => "http://flvplayer.viastream.viasat.tv/play/swf/player120328.swf", + flv => $flv_filename + }; } 1; |