root/trunk/plagger/assets/plugins/filter-entryfulltext/livedoorblog.pl

Revision 481 (checked in by miyagawa, 14 years ago)
  • Added CustomFeed?::Simple to extract links that match a regexp. Fixes #32
  • Added Plagger::Date->strptime($format, $date)
  • Added decode_content and extract_title to Util
  • Support metadata in Config, for now
Line 
1 sub handle_force {
2     my($self, $args) = @_;
3     $args->{entry}->link =~ qr!^http://(?:blog\.livedoor\.jp/|[\w\-]+\.livedoor\.biz/)!;
4 }
5
6 sub extract {
7     my($self, $args) = @_;
8
9     (my $content = $args->{content}) =~ s/\r\n/\n/g;
10     if ( $content =~ m!<div class="main">(.*?)</div>\n\s*<a name="more"></a>\n\s*<div class="main">(.*?)<br clear="all">\n?</div>!s ) {
11         return "<div>$1</div><div>$2</div>";
12     }
13 }
Note: See TracBrowser for help on using the browser.