GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Google::News::TW(3) User Contributed Perl Documentation WWW::Google::News::TW(3)

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金馬影展海報出�'
                        },
   }

get_news()
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.
get_news_for_topic( $topic )
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>

Hey! The above document had some coding errors, which are explained below:
Around line 173:
Non-ASCII character seen before =encoding in 'get_news_for_topic('金牌');'. Assuming CP1252
Around line 214:
You forgot a '=back' before '=head1'
2007-12-27 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.