yahoo.pl

use Web::Scraper;
sub init {
    my $self = shift;
    $self->{domain} = "headlines.yahoo.co.jp";
    $self->{handle} = "/videonews/";
}
 
sub needs_content { 1 }
 
sub find {
    my ($self, $args) = @_;
 
    my $res = scraper {
        process "//a[contains(\@href, 'wm300k')]", movie => '@href';
        process "//img[\@width='320' and \@height='240']", thumbnail => '@src';
    }->scrape($args->{content}, $args->{url});
 
    my $enclosure = Plagger::Enclosure->new;
    $enclosure->url($res->{movie});
    $enclosure->type("video/x-ms-wmv");
    $enclosure->thumbnail({ url => $res->{thumbnail} });
    return $enclosure;
}
 

タグ:

+ タグ編集
  • タグ:

このサイトはreCAPTCHAによって保護されており、Googleの プライバシーポリシー利用規約 が適用されます。

最終更新:2009年01月17日 19:56
ツールボックス

下から選んでください:

新しいページを作成する
ヘルプ / FAQ もご覧ください。