Scrapy, a fast high-level web crawling & scraping framework for Python.
Disable smart strings in lxml XPath evaluations
Paul Tremberth1f184ed7bf5c
diff --git a/scrapy/selector/unified.py b/scrapy/selector/unified.pyindex 790937af5..368222768 100644--- a/scrapy/selector/unified.py+++ b/scrapy/selector/unified.py@@ -85,7 +85,8 @@ class Selector(object_ref):return SelectorList([])try:- result = xpathev(query, namespaces=self.namespaces)+ result = xpathev(query, namespaces=self.namespaces,+ smart_strings=False)except etree.XPathError:raise ValueError("Invalid XPath: %s" % query)