Scrapy, a fast high-level web crawling & scraping framework for Python.
docs: fixed typos and updated code examples
Rolando Espinoza La fuente1402da31c5ae
diff --git a/docs/intro/tutorial.rst b/docs/intro/tutorial.rstindex 3fb965110..6d7c3c64a 100644--- a/docs/intro/tutorial.rst+++ b/docs/intro/tutorial.rst@@ -420,8 +420,8 @@ scraped so far, the code for our Spider should be like this::Now doing a crawl on the dmoz.org domain yields ``DmozItem``'s::- [dmoz.org] DEBUG: Scraped DmozItem({'title': [u'Text Processing in Python'], 'link': [u'http://gnosis.cx/TPiP/'], 'desc': [u' - By David Mertz; Addison Wesley. Book in progress, full text, ASCII format. Asks for feedback. [author website, Gnosis Software, Inc.]\n']}) in <http://www.dmoz.org/Computers/Programming/Languages/Python/Books/>- [dmoz.org] DEBUG: Scraped DmozItem({'title': [u'XML Processing with Python'], 'link': [u'http://www.informit.com/store/product.aspx?isbn=0130211192'], 'desc': [u' - By Sean McGrath; Prentice Hall PTR, 2000, ISBN 0130211192, has CD-ROM. Methods to build XML applications fast, Python tutorial, DOM and SAX, new Pyxie open source XML processing library. [Prentice Hall PTR]\n']}) in <http://www.dmoz.org/Computers/Programming/Languages/Python/Books/>+ [dmoz.org] DEBUG: Scraped DmozItem(desc=[u' - By David Mertz; Addison Wesley. Book in progress, full text, ASCII format. Asks for feedback. [author website, Gnosis Software, Inc.]\n'], link=[u'http://gnosis.cx/TPiP/'], title=[u'Text Processing in Python']) in <http://www.dmoz.org/Computers/Programming/Languages/Python/Books/>+ [dmoz.org] DEBUG: Scraped DmozItem(desc=[u' - By Sean McGrath; Prentice Hall PTR, 2000, ISBN 0130211192, has CD-ROM. Methods to build XML applications fast, Python tutorial, DOM and SAX, new Pyxie open source XML processing library. [Prentice Hall PTR]\n'], link=[u'http://www.informit.com/store/product.aspx?isbn=0130211192'], title=[u'XML Processing with Python']) in <http://www.dmoz.org/Computers/Programming/Languages/Python/Books/>Storing the data (using an Item Pipeline)diff --git a/docs/topics/item-pipeline.rst b/docs/topics/item-pipeline.rstindex 0c325756b..0a4205b8c 100644--- a/docs/topics/item-pipeline.rst+++ b/docs/topics/item-pipeline.rst@@ -98,10 +98,10 @@ spider returns multiples items with the same id::del self.duplicates[spider]def process_item(self, spider, item):- if item.id in self.duplicates[spider]:+ if item['id'] in self.duplicates[spider]:raise DropItem("Duplicate item found: %s" % item)else:- self.duplicates[spider].add(item.id)+ self.duplicates[spider].add(item['id'])return itemBuilt-in Item Pipelines reference@@ -178,7 +178,7 @@ on the respective Item Exporter to get more info.the first line. This format requires you to specify the fields to exportusing the :setting:`EXPORT_FIELDS` setting.-* ``jsonlines``: uses a :class:`~jsonlines.JsonLinesItemExporter`+* ``json``: uses a :class:`~jsonlines.JsonLinesItemExporter`* ``pickle``: uses a :class:`PickleItemExporter`