Merge pull request #2705 from redapple/docs-selectors-sections

DOC Rearrange selector sections
This commit is contained in:
Mikhail Korobov 2017-04-12 21:24:25 +05:00 committed by GitHub
commit 9e04e77542
1 changed files with 6 additions and 3 deletions

View File

@ -593,6 +593,9 @@ Built-in Selectors reference
.. module:: scrapy.selector
:synopsis: Selector class
Selector objects
----------------
.. class:: Selector(response=None, text=None, type=None)
An instance of :class:`Selector` is a wrapper over response to select
@ -720,7 +723,7 @@ SelectorList objects
Selector examples on HTML response
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------
Here's a couple of :class:`Selector` examples to illustrate several concepts.
In all cases, we assume there is already a :class:`Selector` instantiated with
@ -745,7 +748,7 @@ a :class:`~scrapy.http.HtmlResponse` object like this::
print node.xpath("@class").extract()
Selector examples on XML response
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------
Here's a couple of examples to illustrate several concepts. In both cases we
assume there is already a :class:`Selector` instantiated with an
@ -767,7 +770,7 @@ assume there is already a :class:`Selector` instantiated with an
.. _removing-namespaces:
Removing namespaces
~~~~~~~~~~~~~~~~~~~
-------------------
When dealing with scraping projects, it is often quite convenient to get rid of
namespaces altogether and just work with element names, to write more