|
Revision 1988
(checked in by otsune, 1 year ago)
|
assets/plugins/Filter-FindEnclosures/mainichi_jp.pl: rename and fix regexp
assets/plugins/Filter-TruePermalink/msn-mainichi.yaml: no need.
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
sub handle { |
|---|
| 3 |
my ($self, $url) = @_; |
|---|
| 4 |
$url =~ qr!http://www\.mainichi\.jp/[\w/]+/graph/[\d/_]+\.html$!; |
|---|
| 5 |
} |
|---|
| 6 |
|
|---|
| 7 |
sub find { |
|---|
| 8 |
my($self, $args) = @_; |
|---|
| 9 |
|
|---|
| 10 |
if ($args->{content} =~ m!<div class="SlidePhoto"><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 |
} |
|---|