Scrapy, a fast high-level web crawling & scraping framework for Python.
fix ValueError: Invalid XPath: //div/[id="not-exists"]/text() on selectors.rst
Hoat Le4e66955411a5
diff --git a/docs/topics/selectors.rst b/docs/topics/selectors.rstindex 688c2b715..9d19506d2 100644--- a/docs/topics/selectors.rst+++ b/docs/topics/selectors.rst@@ -146,7 +146,7 @@ If you want to extract only first matched element, you can call the selector ``.It returns ``None`` if no element was found:- >>> response.xpath('//div/[id="not-exists"]/text()').extract_first() is None+ >>> response.xpath('//div[@id="not-exists"]/text()').extract_first() is NoneTrueA default return value can be provided as an argument, to be used instead of ``None``: