diff options
author | Paul Wise <pabs3@bonedaddy.net> | 2012-11-04 19:46:46 +0800 |
---|---|---|
committer | Paul Wise <pabs3@bonedaddy.net> | 2013-01-26 16:04:21 +0800 |
commit | e3f319022b0b596e63c4778bb6cb79cf72ba7a0e (patch) | |
tree | 639cf165e9d3662d19174aa0820b72eaaa7a3a1b | |
parent | 3dc8c724a574703a8d480561a49b7aea81c99c09 (diff) | |
download | get-flash-videos-e3f319022b0b596e63c4778bb6cb79cf72ba7a0e.tar.gz |
The Youku plugin can now handle third-party websites embedding videos.
-rw-r--r-- | lib/FlashVideo/Site/Youku.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/FlashVideo/Site/Youku.pm b/lib/FlashVideo/Site/Youku.pm index b487aec..a68eae4 100644 --- a/lib/FlashVideo/Site/Youku.pm +++ b/lib/FlashVideo/Site/Youku.pm @@ -254,4 +254,12 @@ sub shuffle_table { return @shuffled; } +sub can_handle { + my($self, $browser, $url) = @_; + + return 1 if $url && URI->new($url)->host =~ /\.youku\.com$/; + + return $browser->content =~ m{<param[^>]+name=['"]src['"][^>]+value=["']http://player\.youku\.com/player\.php/sid/[^/]+/v\.swf}; +} + 1; |