Scrapy, a fast high-level web crawling & scraping framework for Python.
Merge branch 'master' into spider-name-collision
Adrián Chaves88ade196757a
diff --cc docs/faq.rstindex 84c664d77,d5ea3cb87..34a1e7334--- a/docs/faq.rst+++ b/docs/faq.rst@@@ -372,18 -371,20 +372,31 @@@ Twisted reactor is :class:`twisted.intedifferent reactor is possible by using the :setting:`TWISTED_REACTOR` setting.+ .. _faq-stop-response-download:++ How can I cancel the download of a given response?+ --------------------------------------------------++ In some situations, it might be useful to stop the download of a certain response.+ For instance, if you only need the first part of a large response and you would like+ to save resources by avoiding the download of the whole body.+ In that case, you could attach a handler to the :class:`~scrapy.signals.bytes_received`+ signal and raise a :exc:`~scrapy.exceptions.StopDownload` exception. Please refer to+ the :ref:`topics-stop-response-download` topic for additional information and examples.+++Running ``runspider`` I get ``error: No spider found in file: <filename>``+--------------------------------------------------------------------------++This may happen if your Scrapy project has a spider module with a name that+conflicts with the name of one of the `Python standard library modules`_, such+as ``csv.py`` or ``os.py``, or any `Python package`_ that you have installed.+See :issue:`2680`.++.. _has been reported: https://github.com/scrapy/scrapy/issues/2905+.. _Python standard library modules: https://docs.python.org/py-modindex.html+.. _Python package: https://pypi.org/.. _user agents: https://en.wikipedia.org/wiki/User_agent.. _LIFO: https://en.wikipedia.org/wiki/Stack_(abstract_data_type).. _DFO order: https://en.wikipedia.org/wiki/Depth-first_search