From 2869cf8ddea73761cab148283ce07ab14baa57b4 Mon Sep 17 00:00:00 2001 From: hoatle Date: Wed, 7 Oct 2015 15:51:12 +0700 Subject: [PATCH] fix another invalid xpath error --- docs/topics/selectors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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