diff options
author | Paul Battley <pbattley@gmail.com> | 2012-10-15 00:08:48 +0100 |
---|---|---|
committer | Paul Battley <pbattley@gmail.com> | 2012-10-15 00:08:57 +0100 |
commit | cbf891170f5bb986b93ab41b61fa4596fcbe9c97 (patch) | |
tree | 3921a6cf5bf2ea89b49beae0efcd940d26859789 | |
parent | c52cdf6c0f8a4ddf03041505a2094424d9dff2b4 (diff) | |
download | get-flash-videos-cbf891170f5bb986b93ab41b61fa4596fcbe9c97.tar.gz |
Get restricted embedded Vimeo videos
Vimeo Plus allows creators to restrict embedding by domain. This is
enforced by checking the Referer header.
-rw-r--r-- | lib/FlashVideo/Site/Vimeo.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/FlashVideo/Site/Vimeo.pm b/lib/FlashVideo/Site/Vimeo.pm index 34d6edf..cfff570 100644 --- a/lib/FlashVideo/Site/Vimeo.pm +++ b/lib/FlashVideo/Site/Vimeo.pm @@ -39,6 +39,9 @@ sub find_video { "&codecs=H264,VP8,VP6&type=moogaloop_local&embed_location="; my $filename = title_to_filename($title, "flv"); + $browser->get($url, Referer => $embed_url); + $url = $browser->response->header('Location'); + $browser->allow_redirects; return $url, $filename; |