2008/01/31

Recent entries from same category

  1. 災害報告にtwitterを使うという提案
  2. ぼくが知ってる twitter じゃない
  3. サイトの新着はてなブックマークフィードのdelicious版みたいなのを作った。
  4. microformatsでWebページにメタデータを埋め込む
  5. 今さら聞くのは恥ずかしい「microformatsとは何か?」

データだけ乗っけてscriptソース載せず...ってのは好きじゃないなぁ...
otsuneさんあたりに、「元ソース記事載せないのは好きじゃないなぁ...」と言われそうだけど

use strict;
use Web::Scraper;
use URI;
use YAML;

my $emoji = scraper {
  process '//table[@width="100%" and @cellpadding="2"]//tr/td/font/../..',
    'emoji[]' => scraper {
      process '//td[2]/font', code => 'TEXT';
      process '//td[3]/font', char => 'TEXT';
    };
  result 'emoji';
};

my @urls = (
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_01.php',
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_02.php',
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_03.php',
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_04.php',
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_05.php',
  'http://72.14.253.104/search?q=cache:http%3A//developers.softbankmobile.co.jp/dp/tool_dl/web/picword_06.php',
);
my $res;
foreach my $url (@urls) { push @$res, @{$emoji->scrape(URI->new($url))} };
warn Dump $res;
Posted at by | Edit