InterGuru has asked for the wisdom of the Perl Monks concerning the following question:
I have tried being logged in or out of Amazon to see if that would cause a change. No difference.
Here is the code.
The result of running the code is "No Luck"#!/usr/bin/perl use strict; use LWP::Simple; print "test_get.pl\n"; my $amazon_url = q{http://www.amazon.com/exec/obidos/ASIN/0394756673/ref=nosim/bookread +ersre-20}; my $page = get ($amazon_url); open FILE , '>temp2' or die "Cannot open temp2\n"; print FILE $page; my $sought_string = q{offer-listing}; if ($page =~ /$sought_string/){ print "Found it\n"; } else { print "No luck\n"; }
Update
imp's reply works. Also I already use Net::Amazon, the API does not contain the information that I need.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP simple question
by imp (Priest) on May 24, 2007 at 04:04 UTC | |
|
Re: LWP simple question
by Fletch (Bishop) on May 24, 2007 at 12:12 UTC | |
|
Re: LWP simple question
by tomfahle (Priest) on May 24, 2007 at 15:57 UTC | |
|
Re: LWP simple question
by gferguson (Acolyte) on May 25, 2007 at 15:53 UTC | |
by petdance (Parson) on May 25, 2007 at 20:24 UTC |