mirror of https://github.com/scrapy/scrapy.git
16 lines
328 B
Python
16 lines
328 B
Python
import scrapy
|
|
from scrapy.crawler import AsyncCrawlerProcess
|
|
|
|
|
|
class AsyncioReactorSpider(scrapy.Spider):
|
|
name = "asyncio_reactor"
|
|
|
|
|
|
process = AsyncCrawlerProcess(
|
|
settings={
|
|
"TWISTED_REACTOR": "twisted.internet.asyncioreactor.AsyncioSelectorReactor",
|
|
}
|
|
)
|
|
process.crawl(AsyncioReactorSpider)
|
|
process.start()
|