mirror of https://github.com/scrapy/scrapy.git
commit
780ef128d2
|
|
@ -29,12 +29,13 @@ project as example.
|
|||
|
||||
from twisted.internet import reactor
|
||||
from scrapy.crawler import Crawler
|
||||
from scrapy.settings import Settings
|
||||
from scrapy import log, signals
|
||||
from testspiders.spiders.followall import FollowAllSpider
|
||||
from scrapy.utils.project import get_project_settings
|
||||
|
||||
spider = FollowAllSpider(domain='scrapinghub.com')
|
||||
crawler = Crawler(Settings())
|
||||
settings = get_project_settings()
|
||||
crawler = Crawler(settings)
|
||||
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
|
||||
crawler.configure()
|
||||
crawler.crawl(spider)
|
||||
|
|
|
|||
Loading…
Reference in New Issue