Yahooのトピックスを取得する他の手段

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# utf8
use 5.8.1;
use strict;
use warnings;
use utf8;
use Encode;
use Term::Encoding qw(term_encoding);
my $enc = Encode::find_encoding(term_encoding);
use Data::Feed;
use URI;
# urlを指定する
my $url = URI->new('http://dailynews.yahoo.co.jp/fc/rss.xml');
# サイトにアクセスし、Feedを取得する
my $feed = Data::Feed->parse($url);
print $enc->encode($_->title)."\n" for ($feed->entries);
1
2
3
4
5
6
7
8
菅新首相の支持率62.4% NNN
エース級種牛、生き残り容認へ
回転ずし店に車 14人が重軽傷
茨城・上海チャーター便就航へ
「イカロス」帆の展開8日以降に
他チーム故障 ブラジルは複雑
全仏男子 ナダル5度目の優勝
古瀬アナが絵本作家デビュー
comments powered by Disqus
Built with Hugo
Theme Stack designed by Jimmy