【发布时间】:2015-11-03 13:58:59
【问题描述】:
我正在尝试从this 页面获取产品信息。要获取描述(出现在页面底部),我使用 xpath
response.xpath('//*[@itemprop="description"]/table//text()').extract()[3].strip()
这给了我描述:
u'Color: White, Size:Free Size, With the body: Braided, Buckle: Automatic Deduction, With the body width: section ('
而网站上的一个是
Color: White, Size:Free Size, With the body: Braided, Buckle: Automatic Deduction, With the body width: section (<2cm), Belt Length: 93cm
Product Type: Belts, Accessories
我已验证网站上的内容即使在禁用 javascript 后也会加载。我在这里错过了什么?
【问题讨论】:
-
好像是因为
<符号而被截断了,连BeautifulSoup都截掉了<之后的文字……很奇怪 -
这是一个
parsel错误,我会在存储库here 上检查它
标签: python xpath web-scraping scrapy parsel