Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

by ergowolf (Monk)
on Apr 27, 2000 at 17:58 UTC ( #9398=sourcecode: print w/replies, xml ) Need Help??
Category: web search
Author/Contact Info ergowolf
Description: This program checks for books from fatbrain, but it can be easily be modified to search any site's page.
use strict;
use LWP::UserAgent;

my $VERSION = 1.0;
my %pages = (
                'Firewall 1' => '
                'Bay Network Router Configuration' => 'http://www1.fat',
                'Mastering Algorthims with Perl' => 'http://www1.fatbr',

foreach (keys %pages) {
my $ua = new LWP::UserAgent;
my $req = new HTTP::Request GET => $pages{$_};
my $string = $ua->request($req)->as_string;
    if ($string =~ m/Not yet published/g) {
    print "$_ is not out yet.\n";
    } else {
    print "$_ has been published.";

=head1 NAME

fatbrain - This script takes a list of books and looks to see if they 
+are considered published on fatbrain.


I am always waiting for books to be published and I am sick of doing a
+ll the work in looking them up.  
I created this script to check if the books I am looking for are publi

=head1 README


This script has a few requirements.  You will need LWP and you will ne
+ed to look up the book the first time
yourself.  Once you have the url cut and paste it into the value field
+  in %pages and put in a description in the key
of the hash.





Replies are listed 'Best First'.
Re: Im ashamed at you
by damian1301 (Curate) on Dec 09, 2000 at 05:56 UTC
    Im very very ashamed, I have just found the same code on and I don't think that ergowolf copied anything -- Because his posts were here 3 months before theirs. For those who want the URL, here it is...

    Wanna be perl hacker.
    Dave AKA damian

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: sourcecode [id://9398]
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: (2)
As of 2020-09-27 11:13 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (142 votes). Check out past polls.