Skip to content

Instantly share code, notes, and snippets.

@otsune
Created January 16, 2009 00:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otsune/47734 to your computer and use it in GitHub Desktop.
Save otsune/47734 to your computer and use it in GitHub Desktop.
From 84cb172c78a37447fed916d1846be8d65692709d Mon Sep 17 00:00:00 2001
From: Masafumi Otsune <info@otsune.com>
Date: Fri, 16 Jan 2009 09:32:08 +0900
Subject: [PATCH] Add scraper for egashira
---
root/plugins/tfmplus.com/scraper-ppp.pl | 19 +++++++++++++++++++
1 files changed, 19 insertions(+), 0 deletions(-)
create mode 100644 root/plugins/tfmplus.com/scraper-ppp.pl
diff --git a/root/plugins/tfmplus.com/scraper-ppp.pl b/root/plugins/tfmplus.com/scraper-ppp.pl
new file mode 100644
index 0000000..de2c52d
--- /dev/null
+++ b/root/plugins/tfmplus.com/scraper-ppp.pl
@@ -0,0 +1,19 @@
+# http://www.tfmplus.com/ppp/
+sub init {
+ my $self = shift;
+ $self->{handle} = "/ppp/";
+}
+
+sub build_scraper {
+ scraper {
+ process '//table[@width="850" and descendant::a[contains(@href,".asx")] ]', 'entries[]' => scraper {
+ process 'td.day', title => 'TEXT';
+ process 'td.font11p', body => 'TEXT';
+ process '//a[contains(@href, ".asx")]', enclosure => [ '@href',
+ sub { +{ url => $_, type => 'video/x-ms-asf' } } ];
+ process 'id("index7_r1_c1")', thumbnail => [ '@src', sub { +{ url => $_ } } ];
+ process '//a[contains(@href, ".asx")]', link => '@href';
+ };
+ process 'title', title => 'TEXT';
+ };
+}
--
1.6.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment