From 1abb1af0c609447e487775700bef05d0b4149101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gra=C3=B1a?= Date: Tue, 15 Oct 2013 10:13:43 -0200 Subject: [PATCH] fix typos and wording on selector's introduction --- docs/intro/tutorial.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/intro/tutorial.rst b/docs/intro/tutorial.rst index 5068cd8c1..c147d0497 100644 --- a/docs/intro/tutorial.rst +++ b/docs/intro/tutorial.rst @@ -208,7 +208,7 @@ XPath expressions are indeed much more powerful. To learn more about XPath we recommend `this XPath tutorial `_. For working with XPaths, Scrapy provides a :class:`~scrapy.selector.Selector` -class, it must be instantiated with a :class:`~scrapy.http.HtmlResponse` or +class, it is instantiated with a :class:`~scrapy.http.HtmlResponse` or :class:`~scrapy.http.XmlResponse` object as first argument. You can see selectors as objects that represent nodes in the document @@ -271,8 +271,9 @@ After the shell loads, you will have the response fetched in a local ``response`` variable, so if you type ``response.body`` you will see the body of the response, or you can type ``response.headers`` to see its headers. -The shell also pre-instantiate a selector named ``ss``, it automatically choice -the best parsing rules (XML vs HTML) based on response's type. +The shell also pre-instantiate a selector for this response in variable ``ss``, +the selector automatically chooses the best parsing rules (XML vs HTML) based +on response's type. So let's try it::