This is the XML structure:
<tr>
<td>
<font size="3">
<strong>Location:</strong>
Hiranandani Gardens, Powai
</font>
</td>
</tr>
I want to extract : Hiranandani Gardens, Powai
I tried with these:
response.xpath('//font[@size="3"]/strong[text()="Location:"]/text()').extract()
response.xpath('//font[@size="3"]/strong[text()="Location:"]').extract()
Both returned an empty list.
Note: we must have to use the text of tag, i.e., "Location:". Otherwise, there are many other places on the site where the same XML structure is used. So, it'll fetch many more unnecessary things apart from the desired value if the text of strong tag is not used.