diff options
author | Paul Wise <pabs3@bonedaddy.net> | 2012-11-04 19:46:46 +0800 |
---|---|---|
committer | Paul Wise <pabs3@bonedaddy.net> | 2012-12-16 13:59:50 +0800 |
commit | 2dd911cee09c1778dce09dd2557c737118b865ce (patch) | |
tree | 8d157a400b33698e77a9670d2e3c7d4b569031ce | |
parent | b32ea937e8a6465cdc96d89572b9850658ec2172 (diff) | |
download | get-flash-videos-2dd911cee09c1778dce09dd2557c737118b865ce.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; |