Changeset 18665 for lang/perl/plagger
- Timestamp:
- 09/02/08 22:10:25 (4 months ago)
- Location:
- lang/perl/plagger/assets/plugins/CustomFeed-Script
- Files:
-
- 2 added
- 1 modified
-
shop_melonbooks_co_jp_tsuhan.pl (added)
-
www_taiyosha_co_jp_comic.pl (modified) (3 diffs)
-
www_toranoana_jp_mailorder.pl (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/plagger/assets/plugins/CustomFeed-Script/www_taiyosha_co_jp_comic.pl
r18658 r18665 16 16 process '//table[./tr/th]/tr[not(./th)]', 'entry[]' => scraper { 17 17 process '/tr/td[1]', 18 part => ['text', sub { m!/(.*?)$! or return; $1 } ],19 date => ['text', sub { m!/(.*?)$! or return; $1 }, \&mk_date];18 part => ['text', sub { m!/(.*?)$! or return; $1 } ], 19 date => ['text', sub { m!/(.*?)$! or return; $1 }, \&mk_date]; 20 20 process '/tr/td[2]', 21 publisher => 'text',22 'tags[]' => 'text';21 publisher => 'text', 22 'tags[]' => 'text'; 23 23 process '/tr/td[3]', title => 'text'; 24 24 process '/tr/td[4]', author => 'text'; … … 51 51 my $dt_title = $dt->strftime('%Y/%m分'); 52 52 binmode STDOUT, ":utf8"; 53 print YAML::Dump +{53 print Dump +{ 54 54 title => "太洋社 コミック発売予定一覧 $dt_title", 55 55 link => "http://www.taiyosha.co.jp/comic/comic${dt_path}_date1.html", … … 58 58 59 59 sub mk_date { 60 my $part = shift; 61 return unless defined $part; 60 return unless defined $_; 62 61 63 62 my $date = $dt->clone; 64 return unless eval { $date->set(day => part_to_day($ part)) };63 return unless eval { $date->set(day => part_to_day($_)) }; 65 64 $date->ymd; 66 65 } 67 66 68 67 sub part_to_day { 69 my $part = shift;68 my $part = shift; 70 69 return unless defined $part; 71 70
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)