首页| 论坛| 消息
主题:xpath抓取的值有空格换行符等问题
回帖:a/@href

contains(str1, str2) # str1中有str2,则返回true,例如以下表达式输出链接文字中包含image的链接:
hxs.select('//a/@href').extract()
下一楼›:Scrapy使用XPath的表达式的机制来获得html或xml中的内容。这里只记录下html的使用。
你可以 ..
‹上一楼:# -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# Se ..

查看全部回帖(10)
«返回主帖