sub cnetRssHandler
{
$html = shift;
my( @rValue ) = ();
my ( $title, $url, $blurb );
$html =~ s/&/&/gixs;
print $html;
#exit;
while( $html =~ s/
- .*?
(.*?)<\/title>.*?
(.*?)<\/link>.*?
(.*?)<\/description>.*?
<\/item>//six )
{
$name = $1;
$link = $2;
$description = $3;
$description =~ s/<.*?>//gsix;
$name =~ s/\(.*?\)//gsix;
$description =~ s/<\!\[CDATA\[//gsix;
$description =~ s/\]\]>$//gsix;
$name =~ s/<\!\[CDATA\[//gsix;
$name =~ s/\]\]>$//gsix;
$name =~ s/\s*-.CNET.*?$//gsix;
$name =~ s/^\s+//gsix;
$link =~ s/<\!\[CDATA\[//gsix;
$link =~ s/\]\]>$//gsix;
print STDERR "\nname => $name\n";
#print STDERR "poster => $poster\n";
#print STDERR "date => $date\n";
#print STDERR "department => $department\n";
#print STDERR "description => $description\n";
print STDERR "url => $link\n";
#print STDERR "icon => $icon\n";
#print STDERR "comments => $comments\n";
#print STDERR "category => $category\n";
#print STDERR "caturl => $catUrl\n";
push @rValue, {
'headline' => $name,
'url' => $link,
};
# clean up after ourselves.
undef($name); undef($icon);
undef($poster); undef($date);
undef($department); undef($description);
undef($url); undef($comments);
undef($cmntsAll); undef($cmntsGood);
undef($category); undef($catUrl);
}
#exit 1;
return @rValue;
}
return 1;