Created
January 15, 2009 08:52
-
-
Save mattn/47331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 3add1a3e2a041df91703adc8d32fe9bd4d570465 Mon Sep 17 00:00:00 2001 | |
From: mattn <[email protected]> | |
Date: Thu, 15 Jan 2009 17:50:08 +0900 | |
Subject: [PATCH] add cliplife. | |
--- | |
root/plugins/cliplife.jp/find_enclosures.pl | 16 ++++++++++++++++ | |
root/plugins/cliplife.jp/find_links.yaml | 2 ++ | |
2 files changed, 18 insertions(+), 0 deletions(-) | |
create mode 100644 root/plugins/cliplife.jp/find_enclosures.pl | |
create mode 100644 root/plugins/cliplife.jp/find_links.yaml | |
diff --git a/root/plugins/cliplife.jp/find_enclosures.pl b/root/plugins/cliplife.jp/find_enclosures.pl | |
new file mode 100644 | |
index 0000000..d8a9412 | |
--- /dev/null | |
+++ b/root/plugins/cliplife.jp/find_enclosures.pl | |
@@ -0,0 +1,16 @@ | |
+sub init { | |
+ my $self = shift; | |
+ $self->{handle} = "."; | |
+} | |
+ | |
+ | |
+sub find { | |
+ my ($self, $args) = @_; | |
+ my $uri = URI->new($args->{url}); | |
+ my $video_id = ($uri =~ m!/clip/\?content_id=([\w\-]+)!)[0] or return; | |
+ | |
+ my $enclosure = Plagger::Enclosure->new; | |
+ $enclosure->url("http://player.cliplife.jp/player_external_03.swf?clipinfo=http%3A%2F%2Fstream.cliplife.jp%2Fclipinfo%2Fclipinfo_03.php%3Fcontent_id%3D$video_id"); | |
+ $enclosure->type('application/x-shockwave-flash'); | |
+ return $enclosure; | |
+} | |
diff --git a/root/plugins/cliplife.jp/find_links.yaml b/root/plugins/cliplife.jp/find_links.yaml | |
new file mode 100644 | |
index 0000000..91ccb28 | |
--- /dev/null | |
+++ b/root/plugins/cliplife.jp/find_links.yaml | |
@@ -0,0 +1,2 @@ | |
+follow_link: /clip/\?content_id= | |
+# support thumbnail! | |
-- | |
1.6.1.9.g97c34 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment