Permalink
Browse files

Added crunchyroll.com (Use 'skip RSS')

  • Loading branch information...
1 parent aa914db commit 376ff689132b6313d23df33431ae1deb79718640 @miyagawa miyagawa committed Feb 26, 2009
Showing with 28 additions and 0 deletions.
  1. +13 −0 root/plugins/crunchyroll.com/find_enclosures.pl
  2. +15 −0 root/plugins/crunchyroll.com/scraper.pl
@@ -0,0 +1,13 @@
+sub init {
+ my $self = shift;
+ $self->{handle} = '/media-\d+/';
+}
+
+sub find {
+ my($self, $args) = @_;
+
+ my $enclosure = Plagger::Enclosure->new;
+ $enclosure->url($args->{url});
+ $enclosure->type('text/html');
+ return $enclosure;
+}
@@ -0,0 +1,15 @@
+sub init {
+ my $self = shift;
+ $self->{handle} = '/library/';
+}
+
+sub build_scraper {
+ scraper {
+ process "title", title => 'TEXT';
+ process ".mediathumb-mug>a", 'entries[]' => scraper {
+ process "a", title => '@title', link => '@href';
+ process "div.mediathumb-mug-image", thumbnail => [ '@style',
+ sub { /url\('(.*?)'\)/ and return URI->new($1) } ];
+ };
+ };
+}

0 comments on commit 376ff68

Please sign in to comment.