diff options
author | Zakariyya Mughal <zaki.mughal@gmail.com> | 2012-12-17 00:02:48 -0600 |
---|---|---|
committer | Zakariyya Mughal <zaki.mughal@gmail.com> | 2012-12-17 00:02:48 -0600 |
commit | f84c6fe427a1e2c289a9c69760faa5acc534b446 (patch) | |
tree | 8b3adf8d84023df1034c58c9506d0ab5ab540b5d | |
parent | 5c5c867af1dfc81804b577093cb7b4ffe8a3806f (diff) | |
download | get-flash-videos-f84c6fe427a1e2c289a9c69760faa5acc534b446.tar.gz |
Putlocker: support embed URLs
-rw-r--r-- | lib/FlashVideo/Site/Putlocker.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/FlashVideo/Site/Putlocker.pm b/lib/FlashVideo/Site/Putlocker.pm index 0778fa1..caf75b3 100644 --- a/lib/FlashVideo/Site/Putlocker.pm +++ b/lib/FlashVideo/Site/Putlocker.pm @@ -10,8 +10,15 @@ use URI; sub find_video { my ($self, $browser, $embed_url, $prefs) = @_; + # change from /embed/video_id to /file/video_id + if($embed_url =~ s,/embed/,/file/,) { + info "Retrieving file page: $embed_url"; + $browser->get($embed_url); + } + die 'Could not retrieve video' unless ($browser->success); + my ($id) = ($embed_url =~ m,file/([^/]*),); my ($filename) = title_to_filename(extract_title($browser)); |