root/trunk/plagger/assets/plugins/Filter-FindEnclosures/mainichi_msn.pl
| Revision 969 (checked in by otsune, 3 years ago) |
|---|
| Line | |
|---|---|
| 1 | # add Enclosure http://www.mainichi-msn.co.jp/photo/etc/photo_feature/ |
| 2 | sub handle { |
| 3 | my ($self, $url) = @_; |
| 4 | $url =~ qr!http://www.mainichi-msn.co.jp/.*/graph/.*\d+\.html$!; |
| 5 | } |
| 6 | |
| 7 | sub find { |
| 8 | my($self, $args) = @_; |
| 9 | |
| 10 | if ($args->{content} =~ m!<div class="image"><a href="\d+\.html"><img src="(\d+\.jpg)"!) { |
| 11 | my $enclosure = Plagger::Enclosure->new; |
| 12 | $enclosure->url( URI->new_abs($1, $args->{url}) ); |
| 13 | $enclosure->auto_set_type; |
| 14 | return $enclosure; |
| 15 | } |
| 16 | |
| 17 | return; |
| 18 | } |
Note: See TracBrowser for help on using the browser.
