Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: WWW::Scraper::ISBN::Driver

by traveler (Parson)
on Jul 26, 2006 at 22:53 UTC ( [id://563916]=note: print w/replies, xml ) Need Help??


in reply to WWW::Scraper::ISBN::Driver

There are two problems: first, your line
print $book('title');
should be
print $book->{'title'};
as $book is a hashref.

More importantly, the module goes to the wrong site. It goes to lcweb.loc.gov which is now www.loc.gov. Editing the module fixes that. You should probably contact the author and let him know. His contact information is in the CPAN documentation.

Here is my (working after changing LOC_Driver) code:

use WWW::Scraper::ISBN::Driver; use WWW::Scraper::ISBN::LOC_Driver; $driver = WWW::Scraper::ISBN::LOC_Driver->new(); $LOC = "0764516965"; $driver->verbosity(1); $driver->search($LOC); die " $LOC Not Found" if ! $driver->found; print "Here is the info on $LOC\n"; print ref $book; my $book = $driver->book; print $book->{title};

HTH, --traveler

Replies are listed 'Best First'.
Re^2: WWW::Scraper::ISBN::Driver
by MiamiGenome (Sexton) on Jul 26, 2006 at 23:55 UTC
    Thank you! Works perfectly now. Reported the URL problem to the module author also. Cheers!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found