Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

fix another invalid xpath error

hoatle2869cf8ddea7
diff --git a/docs/topics/selectors.rst b/docs/topics/selectors.rst
index 9d19506d2..273cae0f8 100644
--- a/docs/topics/selectors.rst
+++ b/docs/topics/selectors.rst
@@ -151,7 +151,7 @@ It returns ``None`` if no element was found:
A default return value can be provided as an argument, to be used instead of ``None``:
- >>> sel.xpath('//div/[id="not-exists"]/text()').extract_first(default='not-found')
+ >>> sel.xpath('//div[@id="not-exists"]/text()').extract_first(default='not-found')
'not-found'
Notice that CSS selectors can select text or attribute nodes using CSS3