WWW::Google::News - Access to Google's News Service (Not Usenet)
use WWW:Google::News qw(get_news); my $result = get_news();
This module provides one method get_news() which scren scrapes Google News and returns a data structure similar to ...
{ 'Top Stories' => [ { 'url' => 'http://www.washingtonpost.com/wp-dyn/articles/A9707-2002Nov19.html', 'headline' => 'Amendment to Homeland Security Bill Defeated' }, { 'url' => 'http://www.ananova.com/news/story/sm_712444.html', 'headline' => 'US and UN at odds as Iraq promises to meet deadline' } ], 'Entertainment' => [ { 'url' => 'http://abcnews.go.com/sections/entertainment/DailyNews/Coburn021119.html', 'headline' => 'James Coburn Dies' }, { 'url' => 'http://www.cbsnews.com/stories/2002/11/15/entertainment/main529532.shtml', 'headline' => '007s On Parade At \'Die\' Premiere' } ] }
Which is a reference to a hash keyed on News Section, which points to an array of hashes keyed on URL and Headline.
It also provides a method called get_news_greg_style() which returns the same data, only using a hash keyed on story number instead of the array described in the above.
* Implement an example RSS feed.
* Seek out a good psychologist so we can work through my obsession with hashes.
Greg McCarroll <greg@mccarroll.demon.co.uk>
Darren Chamberlain for rss_alternate.pl
Leon Brocard for pulling me up on my obsessive compulsion to use hashes.
http://http://news.google.com/news/gnmainlite.html
To install WWW::Google::News, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Google::News
CPAN shell
perl -MCPAN -e shell install WWW::Google::News
For more information on module installation, please visit the detailed CPAN module installation guide.