Reputation: 2418
I want to extract the text from the site http://www.jabong.com/Puma-Wirko-Ind-Black-Sneakers-187839.html using x-path:
`item['pcode'] = hxs.select('//*[@id="productInfo"]/div[1]/div[2]/table/tbody/tr[8]/td[2]/text()').extract()`
I'm getting null value.
Upvotes: 1
Views: 538
Reputation: 13301
I tried the following, it works. I used urllib2 to fetch the HTML.
text = hxs.select('//div[@id="productInfo"]//table/tr[8]/td[2]/text()').extract()
and the following not works:
text = hxs.select('//div[@id="productInfo"]//table/tbody/tr[8]/td[2]/text()').extract()
Upvotes: 1