mirror of https://github.com/scrapy/scrapy.git
21 lines
417 B
Python
21 lines
417 B
Python
import scrapy
|
|
from scrapy.crawler import AsyncCrawlerProcess
|
|
|
|
|
|
class NoRequestsSpider(scrapy.Spider):
|
|
name = "no_request"
|
|
|
|
async def start(self):
|
|
return
|
|
yield
|
|
|
|
|
|
process = AsyncCrawlerProcess(
|
|
settings={
|
|
"TWISTED_REACTOR": "twisted.internet.asyncioreactor.AsyncioSelectorReactor",
|
|
"ASYNCIO_EVENT_LOOP": "uvloop.Loop",
|
|
}
|
|
)
|
|
process.crawl(NoRequestsSpider)
|
|
process.start()
|