|
Revision 7480, 0.6 kB
(checked in by hb, 16 months ago)
|
|
plagger/assets/plugins/Filter-EntryFullText/transit_yahoo_railway.yaml: Add EFT
|
| Line | |
|---|
| 1 | # http://transit.yahoo.co.jp/railway/area?ac=<code>&an=<name> |
|---|
| 2 | author: hb@smallstyle |
|---|
| 3 | custom_feed_handle: http://transit\.yahoo\.co\.jp/railway |
|---|
| 4 | custom_feed_follow_link: /detail\?ac=\d+&line=\d+&cp=\d+ |
|---|
| 5 | handle: http://transit\.yahoo\.co\.jp/railway/detail\?ac=\d+&line=\d+&cp=\d+ |
|---|
| 6 | extract_xpath: |
|---|
| 7 | title: //h2/b/text() |
|---|
| 8 | body: //div[@id="info_display"]/text() |
|---|
| 9 | date: //div[@id="info_time"]/text() |
|---|
| 10 | extract_after_hook: | |
|---|
| 11 | my $regex = decode("utf-8","(平常通り|再開|遅れ|運転変更|見合わせ|運休)"); |
|---|
| 12 | my @status; |
|---|
| 13 | while($data->{body} =~ /$regex/g){push(@status, $1);} |
|---|
| 14 | $data->{title} = "[$status[$#status]] $data->{title} $data->{date}" |
|---|