diff options
author | j <j@mailb.org> | 2013-03-23 17:46:36 +0530 |
---|---|---|
committer | j <j@mailb.org> | 2013-03-23 17:46:36 +0530 |
commit | fbeeea650181a14bbc17abff8c14e96124a9019c (patch) | |
tree | cab02380a21a8328337250842a549415a123b798 | |
parent | 2813543084145cdc010206f11adbf19aa51488d5 (diff) | |
download | get-flash-videos-fbeeea650181a14bbc17abff8c14e96124a9019c.tar.gz |
add support for cultureunplugged.com
-rw-r--r-- | lib/FlashVideo/Site/Cultureunplugged.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/FlashVideo/Site/Cultureunplugged.pm b/lib/FlashVideo/Site/Cultureunplugged.pm new file mode 100644 index 0000000..7f5b5d7 --- /dev/null +++ b/lib/FlashVideo/Site/Cultureunplugged.pm @@ -0,0 +1,21 @@ +# Part of get-flash-videos. See get_flash_videos for copyright. +package FlashVideo::Site::Cultureunplugged; + +use strict; +use FlashVideo::JSON; +use FlashVideo::Utils; +use URI::Escape; + +sub find_video { + my ($self, $browser, $embed_url) = @_; + + my ($id, $title) = $embed_url =~ m{/play/(\d+)/(.*?)}; + + die "No video ID found" unless $id; + + $browser->get("http://www.cultureunplugged.com/ajax/getMovieInfo.php?movieId=$id&type="); + my ($json) = from_json($browser->content); + return $json->{'url'}, title_to_filename($json->{'title'}, "mp4"); +} + +1; |