【发布时间】:2016-04-20 19:37:21
【问题描述】:
我正在尝试使用 scrapy 从this 网站抓取一些广告信息。
该网站有一些带有class="product-card new_ outofstock installments_ " 的div 标签。
当我使用时:
items = response.xpath("//div[contains(@class, 'product-')]")
我得到一些具有类属性 = "product-description" 但不是 "product-card" 的节点。
当我使用时:
items = response.xpath("//div[contains(@class, 'product-card')]")
我仍然没有得到任何结果。
为什么会这样?
【问题讨论】: