2006-10-08
■ [Filter][EntryFullText]まんたんウェブ 
http://mantanweb.mainichi.co.jp/web/
mantanweb.yaml
author: Tennetiss handle: http://mantanweb\.mainichi\.co\.jp extract: (<div class="entry-body">.*?)<div class="adsens468x60"> extract_capture: body
最初はxpathでやってみたんだけど、前後に明確に特徴のあるタグがある場合はregexの方が書きやすいように思う。慣れだろうけど。
もし各エントリの最後の方に良く付いてるAmazonアフィも消したいのなら、もう少し前で切ってくださいませ。
config.mantanweb.yamlの一部
- module: Subscription::Config
config:
feed:
- http://mantanweb.mainichi.co.jp/web/index.xml
- module: Filter::EntryFullText
config:
store_html_on_failure: 1
force_upgrade: 1
- module: Filter::ResolveRelativeLink
- module: Filter::Rule
rule:
module: Deduped
force_upgradeしないと、一部のエントリだけalready contains bodyになってしまうので注意。(EFTのyaml内で解決する方法もあったような気がするんだけど)
■ [Filter][EntryFullText]4Gamer.net 
もう既に誰かやってたらごめんなさい。
author: Tennetiss handle: http://www\.4gamer\.net/ extract: (<table width="100%" .*?>.*?)<!-- tDialy:END --> extract_capture: body
- module: Subscription::Config
config:
feed:
- http://www.4gamer.net/rss/rss.shtml
- module: Filter::EntryFullText
config:
store_html_on_failure: 0
- module: Filter::ResolveRelativeLink
- module: Filter::Rule
rule:
module: Deduped
コメントを書く