plaggerやっとなんかできた
オンラインゲームのメンテナンス情報とかがRSSで欲しいなぁと思い挫折してそのまま放置していたplaggerの事を思い出していじってみた。
http://maplestory.nexon.co.jp/web_module/skins/MapleStory/board_list.asp?strboardid=maplestorynews
このページのお知らせ一覧をRSS化しようと思ったのだけど、まず入力に使うプラグインがどれを選んだら良いのかわからない。
始めにCusttomFeed-Configを使うのかと思ったらプラグイン自体が見つからず次へ。
似た名前のCustomFeed-Scriptを使うのかと思ったら、これやるならPlaggerじゃなくてもいい気がしてきたのでもうちょっと検索を続ける。
Filter-EntryFulltextがそれっぽいと言う事が判明
http://d.hatena.ne.jp/toshi123/20060912#p1
を参考にしながらやっとできた。
assets/plugins/Filter-EntryFullText/
author: nyomonyomo custom_feed_handle: http://maplestory\.nexon\.co\.jp/.* custom_feed_follow_link: board_content\.asp handle: http://maplestory\.nexon\.co\.jp/web_module/skins/MapleStory/board_content.asp\?strboardid=maplestorynews\&intidx=.* extract: <td width="61" bgcolor="#93bedd" class="colorfff" align="center">(.*?)</td>.*<td bgcolor="#ffffff" style="padding-bottom:17px;padding-left:17px;padding-top:17px;padding-right:17px;">(.*?)<td bgcolor="#e8e8e8"><img src="http://static\.nexon\.co\.jp/maplestory_3rd/global/spacer\.gif" width="1" height="1" alt=""></td> extract_capture: date body extract_date_format: %Y.%m.%d
maple2rss.yaml
include: - /home/nyomonyomo/plagger/config.base.yaml plugins: - module: Subscription::Config config: feed: - url: http://maplestory.nexon.co.jp/web_module/skins/MapleStory/board_list.asp?strboardid=maplestorynews - module: Filter::Rule rule: module: Deduped - module: Filter::EntryFullText config: store_html_on_failure: 1 - module: Publish::Feed config: format: RSS dir: /home/nyomonyomo/public_html/ filename: nexon.rss
custom_feed_handleをもっと真面目に書いた方が良いのかも知れないけど他にRSS化したいものが出てきたら考える事にした。