Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

RE: RE: Get yahoo's news headlines

by SuperCruncher (Pilgrim)
on Jul 14, 2000 at 23:41 UTC ( [id://22617]=note: print w/replies, xml ) Need Help??


in reply to RE: Get yahoo's news headlines
in thread Get yahoo's news headlines

I believe Yahoo makes their headlines available via RSS, which is a whole lot simpler to extract than this.
Merlyn, this is very interesting to me. I haven't been able to find out anything on Yahoo's site about this. Can you please write any more details you have here?

I'd really like to see more companies distributing information in a more 'programmer-oriented' format, but I suppose they haven't got much incentive to do it. How often have my scripts been broken by sites changing their format? Only recently my SMS script has been broken (see my home node for info). Bravo to Fedex for being the only company I know that makes their services available through an API -- they provide TrackAPI and ShipAPI. Without companies producing APIs etc like this, or content in a standardised structured format, the full benefit of the 'information revolution' (apologies for using cheesy marketing phrase) cannot be realised.

On a side note, does anyone have any idea how to parse RDF in Perl? I was under the impression that RDF was just another XML DTD, but at the W3C site I couldn't find out much about this, and although they did have some Perl code, it wasn't very useful. Any help is appreciated.

<rant;> Thank you to DMOZ etc for providing no real help with parsing their RDF dir dumps </rant>

Replies are listed 'Best First'.
RE: RE: RE: Get yahoo's news headlines
by btrott (Parson) on Jul 14, 2000 at 23:49 UTC
    Try XML::RSS. It uses XML::Parser.

    Example from the docs:

    my $rss = new XML::RSS; $rss->parsefile("fm.rdf"); foreach my $item (@{$rss->{'items'}}) { print "title: $item->{'title'}\n"; print "link: $item->{'link'}\n\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://22617]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-20 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found