Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added crunchyroll.com (Use 'skip RSS')

  • Loading branch information...
commit 376ff689132b6313d23df33431ae1deb79718640 1 parent aa914db
@miyagawa miyagawa authored
View
13 root/plugins/crunchyroll.com/find_enclosures.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;
+}
View
15 root/plugins/crunchyroll.com/scraper.pl
@@ -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) } ];
+ };
+ };
+}
Please sign in to comment.
Something went wrong with that request. Please try again.