aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNigel Taylor <njtaylor0101@gmail.com>2013-04-07 09:03:42 +0100
committerNigel Taylor <njtaylor0101@gmail.com>2013-04-07 09:03:42 +0100
commit2d29a1bcc35593e57a42cdb6fa78a9e34b0ceff6 (patch)
treeb4fa288c9d934d8130d232cd53098fcf79f8c886
parentbbc3a11cbc1621cd3f2010822be624b795af15af (diff)
downloadget-flash-videos-2d29a1bcc35593e57a42cdb6fa78a9e34b0ceff6.tar.gz
Update Pbs.pm with patch from issue 485
-rw-r--r--lib/FlashVideo/Site/Pbs.pm12
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;