【发布时间】:2014-02-06 12:45:11
【问题描述】:
我想获取href 值:
<span class="title">
<a href="https://www.example.com"></a>
</span>
我试过了:
Link = Link1.css('span[class=title] a::text').extract()[0]
但我只是得到<a> 中的文本。如何获取href 中的链接?
【问题讨论】:
-
您能否提供更多有关您正在使用的内容和您尝试解析的代码的详细信息?可能想尝试
a::@href或a::href来选择属性。
标签: python python-2.7 scrapy