diff options
author | zakflash <zakflashvideo@gmail.com> | 2012-07-10 12:52:34 -0700 |
---|---|---|
committer | zakflash <zakflashvideo@gmail.com> | 2012-07-10 12:52:34 -0700 |
commit | fcd007189cc243273e600074fc433956c4cc7e1d (patch) | |
tree | 3381aa2491696b260e0f7010bacdd655339b16bf | |
parent | e848051e82064ae115cfbd032afbf0c9de392534 (diff) | |
parent | 5fd185e94ed1b9d0d1aba4e566989bb4e3caf5d3 (diff) | |
download | get-flash-videos-fcd007189cc243273e600074fc433956c4cc7e1d.tar.gz |
Merge pull request #72 from fcharlier/pinkbike
Add support for www.pinkbike.com videos
-rw-r--r-- | lib/FlashVideo/Site/Pinkbike.pm | 26 | ||||
-rw-r--r-- | t/urls | 3 |
2 files changed, 29 insertions, 0 deletions
diff --git a/lib/FlashVideo/Site/Pinkbike.pm b/lib/FlashVideo/Site/Pinkbike.pm new file mode 100644 index 0000000..6051747 --- /dev/null +++ b/lib/FlashVideo/Site/Pinkbike.pm @@ -0,0 +1,26 @@ +# Part of get-flash-videos. See get_flash_videos for copyright. +package FlashVideo::Site::Pinkbike; + +use strict; +use FlashVideo::Utils; + +sub find_video { + my ($self, $browser, $embed_url) = @_; + + # Extract filename from page title + my $title = extract_title($browser); + debug("Found title : " . $title); + my $filename = title_to_filename($title); + debug("Filename : " . $filename); + + my $video_id = ($embed_url =~ m/\/video\/(\d+)\/?$/)[0]; + + die "Unable to extract url" unless $video_id; + + my $url = "http://lv1.pinkbike.org/vf/" . (int($video_id / 10000)) . "/pbvid-" . $video_id . ".flv"; + debug("Video URL: " . $url); + + return $url, $filename; +} + +1; @@ -304,3 +304,6 @@ http://www.videobb.com/video/WkGeqQlNSYWk # Tv4play http://www.tv4play.se/barn/postis_per?title=postis_per_del_10&videoid=823994 + +# Pinkbike +http://www.pinkbike.com/video/4263/ |