Skip to content

Instantly share code, notes, and snippets.

@otsune
Created January 16, 2009 05:24
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/47830 to your computer and use it in GitHub Desktop.
Save otsune/47830 to your computer and use it in GitHub Desktop.
From a6b034b034056fdc02585e9d3e85fa85f64f4c72 Mon Sep 17 00:00:00 2001
From: Masafumi Otsune <info@otsune.com>
Date: Fri, 16 Jan 2009 14:23:00 +0900
Subject: [PATCH] add date filter
---
root/plugins/animate.tv/scraper-webradio.pl | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/root/plugins/animate.tv/scraper-webradio.pl b/root/plugins/animate.tv/scraper-webradio.pl
index 8a9a2e6..6460586 100644
--- a/root/plugins/animate.tv/scraper-webradio.pl
+++ b/root/plugins/animate.tv/scraper-webradio.pl
@@ -9,7 +9,8 @@ sub build_scraper {
process '//table[@width="565" and descendant::a[contains(@href,".asx")] ]', 'entries[]' => scraper {
process 'td.main_title2', title => 'TEXT';
process '//table[@width="553"]//td[@class="main_txt1"]', body => 'TEXT';
- process 'td.main_txt2', date => 'TEXT';
+ process 'td.main_txt2', date => ['TEXT',
+ sub { s/.*?(\d{4})\x{5e74}(\d{1,2})\x{6708}(\d{1,2})\x{65e5}.*/$1-$2-$3/ } ];
process '//a[contains(@href, ".asx")]', enclosure => [ '@href',
sub { +{ url => $_, type => 'video/x-ms-asf' } } ];
process '//a[contains(@href, ".asx")]', link => '@href';
--
1.6.0.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment