diff options
author | Jonas <jonaskarlsson@fripost.org> | 2012-08-28 23:29:36 +0200 |
---|---|---|
committer | Jonas <jonaskarlsson@fripost.org> | 2012-08-28 23:29:36 +0200 |
commit | 2011b3be59bc7817b89e21c85f944447dcfa5ece (patch) | |
tree | 605a65609dbfa9d6661c74ec601dc0e27401a397 | |
parent | 4b7f37851c0c750d862df6de14e8fd6cca3b0ee2 (diff) | |
download | get-flash-videos-2011b3be59bc7817b89e21c85f944447dcfa5ece.tar.gz |
Changed filename for Svtplay.se
-rw-r--r-- | lib/FlashVideo/Site/Svtplay.pm | 6 |
1 files changed, 3 insertions, 3 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; |