以前、plaggerでスクレイピングをしていた時の設定の残骸を一応残す。
CustomFeed-Config配下のyaml スクレイピングしてRSSの無いサイトのRSSを作っていたっぽいが。
author: XXXXX
match: http://hoge\.hoge\.co\.jp/hoge/hoge/
extract: <td class="title_row"><a href="(.+?)">(.+?)</a>.*?</td>
extract_capture: link1 title
extract_after_hook: $data->{link} = "http://hoge.hoge.co.jp".$data->{link1}
author: XXXXX
match: http://www\.hoge\.com/hoge/hoge/hoge\.cgi
extract: <tr bgcolor="#ffffff"><td align=center>(.+?)<font color="#..00..">(.+?)
</font></td><td>\s+<a href="(.+?)">(.+?)</a></td></tr>
extract_capture: title1 title2 link1 title3
extract_after_hook: |
$data->{title} = $data->{title1}.$data->{title2}." ".$data->{title3};
$data->{link} = "http://www.hoge.com/hoge/hoge/hoge.cgi".$data->{link1};
plagger/config配下のyaml
global:
plugin_path:
- /home/hoge/plagger/assets/plugins
assets_path: /home/hoge/plagger/assets
timezone: Asia/Tokyo
log:
level: debug
plugins:
- module: Subscription::Config
config:
feed:
- http://hoge.hoge.co.jp/hoge/hoge/
- module: CustomFeed::Config
- module: Publish::Feed
config:
format: RSS
dir: /var/www/html/rss/
filename: hoge.rss
#######
global:
plugin_path:
- /home/hoge/perl/Plagger/Plugin
assets_path: /home/hoge/plagger/assets
timezone: Asia/Tokyo
log:
level: debug
plugins:
- module: Subscription::Config
config:
feed:
- http://www.hoge.com/hoge/hoge/hoge.cgi
- module: CustomFeed::Config
- module: Publish::Feed
config:
format: RSS
dir: /hoge/httpdocs/rss/
filename: hoge.rss
- module: Publish::JavaScript
config:
dir: /hoge/httpdocs/js/
filename: hoge.js
