먼져 모듈을 설치한다
cpan> install Yahoo::Search
코드 :
#!/usr/bin/perl
use Yahoo::Search;
my @results = Yahoo::Search->Results(
Doc => "nan1004au",
AppId => "YahooDemo",
Start => 0,
Count => 5);
for my $result (@results) {
print "=" x 30 , "\n";
printf "Result: #%d\n", $result->I + 1,
printf "Url:%s\n", $result->Url;
printf "%s\n", $result->ClickUrl;
printf "Summary: %s\n", $result->Summary;
printf "Title: %s\n", $result->Title;
print "\n";
print "=" x 30 , "\n";
}
결과 :
그냥 아래글보면서 끄적 끄적 ^^
http://linuxpoison.blogspot.com/2009/07/how-to-query-yahoo-search-engine-and.html
반응형