Judging by the random scattering of 'single' and> "double" quotes in the original post - not worth buying.
Consider opting out of Amazon Hacks then, as that is where that code came from (Hack #33, pg. 78).
Now that my cats have stopped driving me batty, I can compose a relatively calmer and more sane response, something which I should have paused and considered in the first place.
Anyways, you're right - there's no excuse for the single and double quote disparities. I can certainly chalk them up to rushed (and missed) deadlines and three or four people editing, rewriting, and tweaking code up til, and after, the deadline, each with their own individual styles. But, yeah, I'd probably have the same pedantic and gut reaction to the single/double mess in this particular example if I weren't so "close" to the actual product.
I don't think, however, that that should dissuade anyone from actually buying the book - what I think /should/ dissuade people is the book's age, and more particularly, the book's topic. Spidering and scraping, by their nature, require ever-evolving scripts, and while I tried to show various techniques throughout the book - techniques that would help people write and modify the scripts on their own - I suspect a good portion of the included scripts are no longer usable. The web just changes too much for a spidering/scraping script published/written a year and a half ago to work verbatim without modification. As such, anyone hoping to buy the book and get 80 out-of-the-page scripts is going to have a bit of unexpected work cut out for them.
-- Morbus Iff ( rotinom ruoy edisni deppart mi pleH ) Technical: http://www.oreillynet.com/pub/au/779 Culture: http://www.disobey.com/ and http://www.gamegrene.com/ icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus