从像这样的网址列表:
<a href="?resultpage=3&p_department=RL&propertyAddress=&propertyType=&minimumBedrooms=&maximumBedrooms=&minimumPrice=&minimumRentFrequency=pcm&maximumPrice=&maximumRentFrequency=pcm">3</a>
<a href="?resultpage=2&p_department=RL&propertyAddress=&propertyType=&minimumBedrooms=&maximumBedrooms=&minimumPrice=&minimumRentFrequency=pcm&maximumPrice=&maximumRentFrequency=pcm" title="Next">Next ></a>
我怎样才能获得具有属性的那个:title =“Next”&gt; Next?
使用:
//@href
值“title =”下一步“&gt;下一步”丢失,因此无法使用过滤网址。
答案 0 :(得分:1)
response.xpath("//a[@title='Next']/@href").extract_first()