Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

RE: PerlMonks Newest 10 Nodes Grabber

by btrott (Parson)
on May 05, 2000 at 00:36 UTC ( #10266=note: print w/ replies, xml ) Need Help??


in reply to PerlMonks Newest 10 Nodes Grabber

This is nice. And now that vroom has very nicely made available the RDF file, we could use XML::RSS instead of having to hand-code the extraction code (although hand- coding is probably faster).

So here's the same thing but using XML::RSS:

#!/usr/local/bin/perl -w use strict; use constant URL => 'http://www.perlmonks.org/headlines.rdf'; use LWP::Simple; use XML::RSS; my $rss = new XML::RSS; $rss->parse( get URL ); for my $item (@{ $rss->{'items'} }) { print "<a href=", $item->{'link'}, ">", $item->{'title'}, "</a><br +>\n"; }


Comment on RE: PerlMonks Newest 10 Nodes Grabber
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2015-07-03 18:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (55 votes), past polls