Merge pull request #400 from irgmedeiros/patch-2

Update the second code example
This commit is contained in:
Pablo Hoffman 2013-10-07 07:57:18 -07:00
commit 8b9526a8f6
1 changed files with 3 additions and 2 deletions

View File

@ -58,13 +58,14 @@ Here is an example, using the `testspiders`_ project:
from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy.settings import Settings
from scrapy import log
from testspiders.spiders.followall import FollowAllSpider
from scrapy.utils.project import get_project_settings
def setup_crawler(domain):
spider = FollowAllSpider(domain=domain)
crawler = Crawler(Settings())
settings = get_project_settings()
crawler = Crawler(settings)
crawler.configure()
crawler.crawl(spider)
crawler.start()