mirror of https://github.com/scrapy/scrapy.git
19 lines
364 B
Python
19 lines
364 B
Python
import scrapy
|
|
from scrapy.crawler import AsyncCrawlerProcess
|
|
|
|
|
|
class NoRequestsSpider(scrapy.Spider):
|
|
name = "no_request"
|
|
|
|
async def start(self):
|
|
import twisted.internet.reactor # noqa: F401
|
|
|
|
return
|
|
yield
|
|
|
|
|
|
process = AsyncCrawlerProcess(settings={"TWISTED_REACTOR_ENABLED": False})
|
|
|
|
process.crawl(NoRequestsSpider)
|
|
process.start()
|