added reference to working with relative xpaths in the tutorial

This commit is contained in:
Ismael Carnales 2009-07-23 09:05:14 -03:00
parent 9baa6bb2a8
commit 6d24ae5920
2 changed files with 10 additions and 0 deletions

View File

@ -321,6 +321,13 @@ that property here, so::
desc = site.x('text()').extract()
print title, link, desc
.. note::
For a detailed description of using nested selectors see
:ref:`topics-selectors-nesting-selectors` and
:ref:`topics-selectors-relative-xpaths` in :ref:`topics-selectors`
documentation
Let's add this code to our spider::
from scrapy.spider import BaseSpider

View File

@ -148,6 +148,7 @@ Here's an example used to extract images names from the :ref:`HTML code
u'My image 4',
u'My image 5']
.. _topics-selectors-nesting-selectors:
Nesting selectors
-----------------
@ -173,6 +174,8 @@ The ``x()`` selector method returns a list of selectors, so you can call the
Link number 3 points to url [u'image4.html'] and image [u'image4_thumb.jpg']
Link number 4 points to url [u'image5.html'] and image [u'image5_thumb.jpg']
.. _topics-selectors-relative-xpaths:
Working with relative XPaths
----------------------------