New in version 2.0.
Scrapy has partial support for
asyncio. After you install the
asyncio reactor, you may use
asyncio-powered libraries in any coroutine.
asyncio support in Scrapy is experimental, and not yet
recommended for production environments. Future Scrapy versions
may introduce related changes without a deprecation period or
Installing the asyncio reactor¶
asyncio support, set the
TWISTED_REACTOR setting to
If you are using
CrawlerRunner, you also need to
reactor manually. You can do that using
Using custom asyncio loops¶
You can also use custom asyncio event loops with the asyncio reactor. Set the
ASYNCIO_EVENT_LOOP setting to the import path of the desired event loop class to
use it instead of the default asyncio event loop.