Subscription::Config + CustomFeed::Simple + Filter::EntryFullTextが凄い
PlaggerでFeed以外のページを扱えないだろうか?といろいろ調べてみたところ、やっぱり扱えるようです。
以下、Plaggerで
@IT: .NET TIPS 日付順インデックス
http://www.atmarkit.co.jp/fdotnet/dotnettips/index/date.html
の.NET TipsのHTMLを抽出してGmailなどに転送する方法です。
http://subtech.g.hatena.ne.jp/otsune/20060601/atmarkithoge
をまねして@IT用のyamlを書く。
atmarkit-misc.yaml
たまにこれに引っかからない記事があるんだけど、原因は追求できてません。
handle: http://www\.atmarkit\.co\.jp/
extract: (?:<!-- #BeginEditable "(?:%96%7B%95%B6|%93%E0%97e)" -->)
(.*?)(?:<!-- #EndEditable -->)
extract_capture: body
config.yamlの該当箇所をこんな感じで書く。
globalと出力部分はお好みで。
plugins:
- module: Subscription::Config
config:
feed:
- url: http://www.atmarkit.co.jp/fdotnet/dotnettips/index/date.html
meta:
follow_link: /dotnettips/- module: CustomFeed::Simple
- module: Filter::ResolveRelativeLink
- module: Filter::EntryFullText
config:
store_html_on_failure: 1- module: Filter::BreakEntriesToFeeds
出力をGmailにしたら、Gmailの受信トレイに380通くらいのメールがどっさり。
.NET Tipsをまるまる自分のGmailに転送成功。