WWW::Google::News::TW - Access to Google's Taiwan News Service (Not Usenet)
use WWW::Google::News::TW qw(get_news); my $results = get_news(); my $results = get_news_for_topic('金牌');
This module provides a couple of methods to scrape results from Google Taiwan News, returning a data structure similar to the following (which happens to be suitable to feeding into XML::RSS).
{ '社會' => [ { 'update_time' => '11å°�時å‰�', 'source' => 'è�¯å�ˆæ–°è�žç¶²-', 'summary' => 'ä¸�少民眾å�‘公平會檢舉,質疑ä¸è�¯é›»ä¿¡æ¯�月帳單收å�–五元「屋內é…�線月租費ã€�çš„å�ˆç�†æ€§ã€‚公平會昨天決è°ï¼Œè¦�求ä¸è�¯é›»ä¿¡è¦�讓樓高四樓以下的用戶,å…�收五元月租費,並把訊æ�¯æ�露在電信帳單 ', 'url' => 'http://udn.com/NEWS/LIFE/LIFS2/2233728.shtml', 'headline' => 'ä¸è�¯é›»é…�線費四樓以下建物å…�收' }, ], '娛樂' => [ { 'update_time' => '2å°�時å‰�', 'source' => 'ç€Ÿæ¹˜æ™¨å ±-', 'summary' => 'æœ¬å ±ç¶œå�ˆæ¶ˆæ�¯å�°ç�£é‡‘é¦¬å½±å±•åŸ·å§”æœƒæ˜¨æ—¥å…¬ä½ˆæœ¬å¹´åº¦æ´»å‹•æµ·å ±ï¼Œå…©æ¬¾ä¸‰å¹…éƒ½ä»¥å½©è™¹ç‚ºè¦–è¦ºä¸»é¡Œï¼Œè±¡å¾µé›»å½±çš„å…‰å½±èˆ‡å¤¢æƒ³ï¼Œå¼·èª¿å‰µä½œè€…é›»å½±å¤¢çš„å¯¦ç�¾ï¼Œä¹Ÿæ˜¯è§€çœ¾é«”驗電影夢的é�Žç¨‹ ', 'url' => 'http://220.168.28.52:828/xxcb.rednet.com.cn/Articles/04/09/10/544900.HTM', 'headline' => '2004é‡‘é¦¬å½±å±•æµ·å ±å‡ºçˆ�' }, }
Scrapes http://news.google.com.tw/news?ned=ttw and returns a reference to a hash keyed on News Section, which points to an array of hashes keyed on URL and Headline.
Queries http://news.google.com.tw/news?ned=tw for results on a particular topic, and returns a pointer to an array of hashes containing result data.
WWW::Google::News, http://news.google.com.tw/
* I haven't think about it yet....
Cheng-Lung Sung <clsung@tw.freebsd.org>
Greg McCarroll <greg@mccarroll.demon.co.uk>, Bowen Dwelle <bowen@dwelle.org> for the basis of this module
Copyright 2004,2005,2006,2007 by Cheng-Lung Sung <clsung@tw.freebsd.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
2 POD Errors
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'get_news_for_topic('金牌');'. Assuming CP1252
You forgot a '=back' before '=head1'
To install WWW::Google::News::TW, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Google::News::TW
CPAN shell
perl -MCPAN -e shell install WWW::Google::News::TW
For more information on module installation, please visit the detailed CPAN module installation guide.