|
|
||
# http://bmmovie.hp.infoseek.co.jp/ author: yhara match: http://bmmovie.hp.infoseek.co.jp/top.html extract: (\d+)/(\d+)(?:<BR>\n)+((?:(?!\d+\/\d+|<!--Infoseek Analyzer).)*) extract_capture: m d body extract_after_hook: $data->{date} = Plagger::Date->new(year => Plagger::Date->now->year, month => $data->{m}, day => $data->{d}); $data->{title} = "$data-> {m}/$data->{d}"; $data->{link} = "http://bmmovie.hp.infoseek.co.jp/"; $data->{body} =~ s/(<BR>\n)+\z//;
改行が多いので、エントリ前後の空行は弾くようにした。
時刻の生成が汚い。がどうするもんか良くわからん。
Plagger::Plugin::Aggregator::Simple [info] Fetch http://bmt.cc/ Plagger::Cache [debug] Cache HIT: Aggregator-Simple|http://bmt.cc/ Plagger::Plugin::Aggregator::Simple [debug] 200: http://bmt.cc/ Plagger::Plugin::Aggregator::Simple [error] http://bmt.cc/ Plagger [error] http://bmt.cc/ is not aggregated by any aggregator
仕方がないので、[read more] 以下を諦めてCCを使うことに。
# bm terminus
author: yhara
match: http://bmt.cc/
extract: <h3 class="item"><a href="([^\"]*)">([^<]*)</a></h3>\s*<div class="itembody">((?:(?!<div class="iteminfo">).)*)
extract_capture: link title body
extract_encode: euc-jp
extract_after_hook: $data->{link} = "http://bmt.cc" . $data->{link};
最初、matchをhandleにしてて数十分悩んだ。orz
# Hello, world! author: yhara handle: http://rails.office.drecom.jp/takiuchi/archive/\d+ extract_xpath: body: //div[@class='entry-layer text']
これは簡単。