I don't have help for you with your question directly. I will say it's against Amazon's terms of service to do what you're doing and there's no reason to bother; it's difficult and dicey and they often swap page layouts live as parts of A/B tests or phasing in changes across many servers. They have a free API which gets the information robustly; and, though it won't feel like it at first, quite directly and simply. I don't think there are any good Perl tutorials on it though which is sad.

URI::Amazon::APA is an excellent, minimal interface to the REST version of the APA (Amazon Product Advertising) portion of the AWS (Amazon Web Services). You need a dev account and to do some document diving but it has big advantages over what you're trying to do: 1) it's not breaking your user agreement, 2) it's robust and won't fail/change (well, not more than once every five years or so anyway).

I don't know if there are modules with more features to do this on the CPAN right now. I do know that the legacy Amazon interface to the ECS (E-Commerce Service) which is what most of the older modules are (and, again, sadly, the one I wrote for myself and a client and will have to replace) going to stop working on August 15th. Amazon gave a loooooong lead time on this; over a year if memory serves. And the original disconnect date is well past due, again, IIRC. So this deadline seems unlikely to be pushed back.


In reply to Re: Using Mechanize to get website content by Your Mother
in thread Using Mechanize to get website content by techtoys

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.