芸スポの競馬スレだけ定期的にチェックしたかったので、やってみた。
どうせだからbodyに>>1が入るようにしてみた。

config.yaml

plugins:
  - module: Subscription::Config
    config:
      feed:
        - url: http://news24.2ch.net/mnewsplus/subback.html
          meta:
            follow_link: /mnewsplus/\d+/l50

  - module: CustomFeed::Simple
  - module: Filter::EntryFullText
    rule:
      expression: $args->{entry}->title =~ /競馬/

  - module: SmartFeed
    config:
      title: 2ch芸スポ速報の競馬スレ一覧
      id: keiba
    rule:
      expression: $args->{entry}->title =~ /競馬/

  - module: Publish::Feed
    rule:
      expression: $args->{feed}->id eq 'keiba'
    config:
      format: RSS
      dir: /foo/bar/feed/
      filename: mnewsplus_keiba.xml

assets/plugins/Filter-EntryFullText/2ch_1get.yaml

author: hanwarai
handle: http://.+?\.2ch\.net/.+?/\d+/l50
extract: <h1.*?>(.*?)</h1>.*?<dt>1 :.*?<b>(.*?)</b>.*?:(.*?)\(.*?\)(.*?)<dd>(.*?)<br><br>\s
extract_capture: title author date1 date2 body
extract_after_hook: |
  $data->{date} = $data->{date1} . $data->{date2};
extract_date_format: %Y/%m/%d %H:%M:%S

http://feeds.feedburner.jp/2ch-mnewsplus-keiba

コメントする

Trackbacks(0): http://mt4.hanwarai.com/mt-tb.cgi/7

無し

前後のエントリー