Errata

Amazon Hacks

Errata for Amazon Hacks

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date submitted Date corrected
Printed
Page 69
Last paragraph and URL at bottom of page

The text says
"...with the most helpful reviews (as voted by Amazon users) listed first,"
but the URL includes "show=-rating" (highest ratings listed first) instead of "show=-votes".
http://amazon.com/o/tg/detail/-/0596004478/?vi=customer-reviews&show=-rating
should be:
http://amazon.com/o/tg/detail/-/0596004478/?vi=customer-reviews&show=-votes

Anonymous   
Printed
Page 82
The code segment has 3 incorrect characters

-The dagger should be d
-The small open bracket should be (
-The small close bracket should be )

Anonymous   
Printed
Page 87
line 3

Amazon.com PageRank of your book...
should be:
Amazon.com rank of your book...

Anonymous   
Printed
Page 167
65.3. Keep the Search Results Local with JavaScript

this section features a web site / tool that is no longer functioning

Anonymous   
Printed
Page 171
Hack 67

hack 67, donating to charities, givequick.org: apparently the site is down for good.

http://www.johneklund.com/amazon/versions.php:

From Richard Winchell (the brain behind GiveQuick):
I'm... taking it down... permanently. The reason is that Amazon has taken
down their list of nonprofit associate codes, citing concerns about the
implications of associate program payouts on those group's nonprofit
status. Apparently the associate payments may actually constitute 'profit'
in the view of the government. Go figure.

Anonymous   
Printed
Page 247
The code segment has 1 incorrect character

-The dagger should be d

(PDF Bonus Hack)**This errata is actually for the "Find Wish Lists with Your Mac Address Book" hack in the
PDF Bonus Hacks for the book:

Amazon has changed their Wish List HTML, so the screen scraping wasn't working properly. Below is an
updated version:

(*
Find Wish Lists in Address Book

The script loops through people in your Address Book, checking Amazon
to see if they have a Wish List. If their Wish List is found, you
have the option to view it in your default browser.

by Paul Bausch
*)

-- set some variables for the curl command

set userAgent to "Mozilla/5.0 (Macintosh; U; PPC Mac OSX; en-us)"
set curlCommand to "curl -i -b -A -L "" & userAgent & "" "

-- open Address Book and loop through people

tell application "Address Book"
repeat with thisPerson in the people
set thisName to name of thisPerson
repeat with thisAddress in email of thisPerson
set thisEmail to value of thisAddress

-- build the URL that will search for the Wish List

set baseURL to "http://www.amazon.com/gp/registry/search.html"
set thisURL to baseURL & "/?type=wishlist\&field-name=" & thisEmail

-- use curl to fetch the search page

-- display dialog thisURL
-- quit

set thisWishPage to do shell script curlCommand & thisURL

-- if the Wish List URL is found in headers, prompt user for action

if thisWishPage contains "&id=" then
set theAction to display dialog thisName & " has an Amazon wishlist."
buttons {"View", "Ignore"}
if button returned of theAction is "View" then

-- build Wish List URL based on ID, and bring up

set beginID to (offset of "&id=" in thisWishPage) + 4
set thisWishID to get text beginID thru (beginID + 16) of
thisWishPage

set beginID to 1
set endID to (offset of return in thisWishID) - 1
set thisWishID to get text beginID thru endID of thisWishID

tell me to open location "http://www.amazon.com/o/registry/" &
thisWishID
end if
end if
end repeat
end repeat
end tell

Anonymous