diff options
author | zakflash <zakflashvideo@gmail.com> | 2012-12-19 12:45:13 -0800 |
---|---|---|
committer | zakflash <zakflashvideo@gmail.com> | 2012-12-19 12:45:13 -0800 |
commit | 146dfdc48bd28f86064ad9bceeac53db7a9b9600 (patch) | |
tree | 8b3adf8d84023df1034c58c9506d0ab5ab540b5d | |
parent | 5c5c867af1dfc81804b577093cb7b4ffe8a3806f (diff) | |
parent | f84c6fe427a1e2c289a9c69760faa5acc534b446 (diff) | |
download | get-flash-videos-146dfdc48bd28f86064ad9bceeac53db7a9b9600.tar.gz |
Merge pull request #85 from zmughal/putlocker
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)); |