microformats vCard and Web::Scraper

| コメント(1) | トラックバック(0)

Perl microformat parsing というスレッドで「microformats の vCard などを Perl でスクレイピングする」という話題がありましたので、私が Web::Scraper を紹介しましたところ、Web::Scraper の作者の miyagawa さんよりベターな使い方のレスポンスをいただきました。ありがとうございました。

my $scraper = scraper {
    process ".vcard", "vcards[]" => scraper {
        process ".email", email => '@href';
        process ".fn", fullname => "TEXT";
        process ".tel", tel => "TEXT";
        process ".title", title => "TEXT";
    };
};
my $result = $scraper->scrape($uri);

scrape をネストさせるとは恐れ入りました。。。

この件について builder tech day - open API & beyond で Lightning talk してもいいかなと思いました。microformats と Web::Scraper はかなり親和性が高いのでもっと広まるといいと思います。まだ募集してるかな?

LTに出る出ないに関わらず、builder tech day - open API & beyond は行きます。よろしくお願いします。

トラックバック(0)

トラックバックURL: http://www.s14u.info/mt4/mt-tb.cgi/386

コメント(1)

うひ><
http://b.hatena.ne.jp/entry/http://www.s14u.info/mt/archives/2008/02/microformats_vc.html

コメントする

このブログ記事について

このページは、shigetaがFebruary 23, 2008 9:57 PMに書いたブログ記事です。

ひとつ前のブログ記事は「Action Streams プラグイン」です。

次のブログ記事は「OpenID Hack-a-thon」です。

最近のコンテンツはインデックスページで見られます。過去に書かれたものはアーカイブのページで見られます。