mirror of https://github.com/scrapy/scrapy.git
27 lines
482 B
Python
27 lines
482 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_ENABLED": False,
|
|
"DOWNLOAD_HANDLERS": {
|
|
"http": None,
|
|
"https": None,
|
|
"ftp": None,
|
|
},
|
|
"TELNETCONSOLE_ENABLED": False,
|
|
}
|
|
)
|
|
|
|
process.crawl(NoRequestsSpider)
|
|
process.start()
|