I have XPath with which I am trying to match meta tags with a name attribute with a value containing the word "keyword", regardless of the case. Basically, I'm trying to match:
<meta name="KEYWORDS">
<meta name="Keywords">
<meta name="keywords">
with XPath
'descendant::meta[contains(lower-case(@name), "keyword")]/@content'
I use Scrapy and built-in selectors, but when I try to use this XPath, I get the error "Invalid XPath: ...". What am I doing wrong and how to do what I want to do right?
source
share