root/trunk/plagger/assets/plugins/Filter-EntryFullText/pmachine.pl

Revision 966 (checked in by youpy, 14 years ago)

fix regexp

Line 
1 # author: Masafumi Otsune
2 sub handle {
3     my($self, $args) = @_;
4     $args->{content} =~ m!Powered by <a href="?http://www\.pmachine\.com/!si;
5 }
6
7 sub extract {
8     my($self, $args) = @_;
9     if ($args->{content} =~ m!<h2 class="title">(?:.*?)</h2>(?:</a>)?(.*?)<\!--\n<rdf:RDF!s){
10         my $body = $1;
11         return "<div>$body</div>";
12     }
13     return;
14 }
15
Note: See TracBrowser for help on using the browser.