mirror of https://github.com/scrapy/scrapy.git
This change removes singletons for stats collection and signal
dispatching facilities, by making them a member of the Crawler class.
Here are some examples to illustrates the old and new API:
Signals - before:
from scrapy import signals
from scrapy.xlib.pydispatch import dispatcher
dispatcher.connect(self.spider_opened, signals.spider_opened)
Signals - now:
from scrapy import signals
crawler.signals.connect(self.spider.opened, signals.spider_opened)
Stats collection - before:
from scrapy.stats import stats
stats.inc_value('foo')
Stats collection - now:
crawler.stats.inc_value('foo')
Backwards compatibility was retained as much as possible and the old API
has been properly flagged with deprecation warnings.
|
||
|---|---|---|
| .travis | ||
| artwork | ||
| bin | ||
| debian | ||
| docs | ||
| extras | ||
| scrapy | ||
| scrapyd | ||
| sep | ||
| .coveragerc | ||
| .gitignore | ||
| .hgtags | ||
| .travis.yml | ||
| AUTHORS | ||
| INSTALL | ||
| LICENSE | ||
| MANIFEST.in | ||
| Makefile.buildbot | ||
| NEWS | ||
| README.rst | ||
| setup.cfg | ||
| setup.py | ||
| tox.ini | ||
README.rst
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
</head>
</html>
Scrapy
Overview
Scrapy is a fast high-level screen scraping and web crawling framework, used to crawl websites and extract structured data from their pages. It can be used for a wide range of purposes, from data mining to monitoring and automated testing.
For more information including a list of features check the Scrapy homepage at: http://scrapy.org
Requirements
- Python 2.6 or up
- Works on Linux, Windows, Mac OSX, BSD
Install
The quick way:
pip install scrapy
For more details see the install section in the documentation: http://doc.scrapy.org/en/latest/intro/install.html
Releases
You can download the latest stable and development releases from: http://scrapy.org/download/
Documentation
Documentation is available online at http://doc.scrapy.org/ and in the docs directory.