diff --git a/docs/intro/tutorial.rst b/docs/intro/tutorial.rst index 17249b567..ab2feb158 100644 --- a/docs/intro/tutorial.rst +++ b/docs/intro/tutorial.rst @@ -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 diff --git a/docs/topics/selectors.rst b/docs/topics/selectors.rst index ebb333cf3..11b1da9d9 100644 --- a/docs/topics/selectors.rst +++ b/docs/topics/selectors.rst @@ -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 ----------------------------