diff options
author | Nigel Taylor <njtaylor0101@gmail.com> | 2013-04-07 09:03:42 +0100 |
---|---|---|
committer | Nigel Taylor <njtaylor0101@gmail.com> | 2013-04-07 09:03:42 +0100 |
commit | 2d29a1bcc35593e57a42cdb6fa78a9e34b0ceff6 (patch) | |
tree | b4fa288c9d934d8130d232cd53098fcf79f8c886 | |
parent | bbc3a11cbc1621cd3f2010822be624b795af15af (diff) | |
download | get-flash-videos-2d29a1bcc35593e57a42cdb6fa78a9e34b0ceff6.tar.gz |
Update Pbs.pm with patch from issue 485
-rw-r--r-- | lib/FlashVideo/Site/Pbs.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/FlashVideo/Site/Pbs.pm b/lib/FlashVideo/Site/Pbs.pm index c8ef937..b94d065 100644 --- a/lib/FlashVideo/Site/Pbs.pm +++ b/lib/FlashVideo/Site/Pbs.pm @@ -32,9 +32,12 @@ sub find_video { die "Must have Crypt::Rijndael installed to download from PBS" unless eval { require Crypt::Rijndael }; - my ($media_id) = $browser->uri->as_string =~ m[ - ^http://video\.pbs\.org/video/(\d+) - ]x; + my ($media_id) = $embed_url =~ m[http://video\.pbs\.org/videoPlayerInfo/(\d+)]x; + unless (defined $media_id) { + ($media_id) = $browser->uri->as_string =~ m[ + ^http://video\.pbs\.org/video/(\d+) + ]x; + } unless (defined $media_id) { ($media_id) = $browser->content =~ m[ http://video\.pbs\.org/widget/partnerplayer/(\d+) @@ -49,6 +52,9 @@ sub find_video { ($media_id) = $browser->content =~ m[var videoUrl = "([^"]+)"]; } unless (defined $media_id) { + ($media_id) = $browser->content =~ m[pbs_video_id_\S+" value="([^"]+)"]; + } + unless (defined $media_id) { my ($pap_id, $youtube_id) = $browser->content =~ m[ \bDetectFlashDecision\ \('([^']+)',\ '([^']+)'\); ]x; |