【发布时间】:2015-09-05 06:05:58
【问题描述】:
我正在尝试查找并抓取此页面中给定评论的“cmets”数量:https://www.goodreads.com/book/show/2767052-the-hunger-games
在这种情况下,常规响应调用似乎不起作用。我试过了:response.xpath("div1/div[3]/div1/a[2]/text()").re(r'.*(\d)\s.*')
response.xpath("div1/div[3]/div1/a[2]/text()").re(r'(\d)\s.*')
response.xpath("div1/div[3]/div1/a[2]/text()").response
什么都不返回
页面源(元素)显示有一个“ev”元素。任何人都可以提供一些线索如何解决这个问题?附上图片。
【问题讨论】:
-
我很确定
ev在网络检查器中意味着event。 -
那只是an indication by the Firefox Inspector that the element has an event listener。如果您尝试单击它,那应该很明显。
标签: javascript python html xpath scrapy