From: Mark Thomas Date: 2009-07-24T10:20:13+09:00 Subject: Re: Problem with xpath in scrubyt. On Jul 15, 12:32 am, likhon wrote: >     fetch "http://search.half.ebay.com/#{isbn}" >     henewbooks "//html/body/table[2]/tbody/tr/td/table[4]/tbody/tr/td > [2]/table/tbody/tr/td/table[2]/tbody" do >         henb "//tr[@class = 'tr-border']" do Positional XPaths like this are fragile. I don't recommend just taking the path from Firebug or other DOM inspectors. What happens when Half.com decides to put a notice in an additional table early in the page? Your XPath will break. Instead, think of how a human identifies the item. It's the table immediately after the Brand New label, correct? A better XPath would be: //table[preceding-sibling::a[1][@name="itemlist_BRAND_NEW"]]//tr [@class="tr-border"] This does the same thing, but is much less susceptible to unrelated page changes. If you do a lot of scraping, I recommend really getting familiar with all that XPath has to offer. DOM inspectors are not smart enough. -- Mark.