Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Creating a perlmonks node grabber

by httptech (Chaplain)
on May 04, 2000 at 16:44 UTC ( #10217=monkdiscuss: print w/ replies, xml ) Need Help??

I'm brainstorming on how to create a perlmonks node grabber. Since you can download nodes in sequential order, it shouldn't be too hard to just request a set of numbers until you hit a "Not Found", and then display the last 10 or so.

However, I don't want to create so much useless traffic on the site, essentially stabbing in the dark to find out what the last node is. I'm trying to figure out a way to figure out the latest node quickly and efficiently. Anyone got any ideas?

Or, Vroom, you could add a perlmonks.xml backend to the site that could be slurped every 30 minutes by the more obsessed monks...

Comment on Creating a perlmonks node grabber
Replies are listed 'Best First'.
RE: Creating a perlmonks node grabber
by httptech (Chaplain) on May 04, 2000 at 17:17 UTC
    Ok, here's my code for this. This displays the newest 10 nodes. From here it's easy to cut and paste this into my Slashdot Headline Grabber or create a Perl/Tk,Perl/Gtk or Perl/Qt app to do the same thing.
    use LWP::Simple; my $slurp = get("\%20Node +s"); push @nodes, $1 while $slurp =~ /\?node_id=(\d+)\&/g; print join("\n", (reverse sort {$a <=> $b} @nodes)[0..9]);
      This seemed more appropriate to the snippets section, so I added it there as well.
RE: Creating a perlmonks node grabber
by httptech (Chaplain) on May 04, 2000 at 16:59 UTC
    Well, I answered my own question by digging around a bit more and finding the "Newest Nodes" node. Is this new, or did I just miss it before?
RE: Creating a perlmonks node grabber
by vroom (Pope) on May 04, 2000 at 22:30 UTC
      I've rewritten this in the snippets section to use headlines.rdf now.
        That last post was from me; I accidentally logged myself out by using instead of

        Another great reason to use user-defined stylesheets, so you can tell immediately if you're logged in or not :)

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (2)
As of 2015-11-29 07:51 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (749 votes), past polls