mirror of https://github.com/scrapy/scrapy.git
18 lines
380 B
Python
18 lines
380 B
Python
import scrapy
|
|
from scrapy.crawler import CrawlerProcess
|
|
|
|
|
|
class NoRequestsSpider(scrapy.Spider):
|
|
name = 'no_request'
|
|
|
|
def start_requests(self):
|
|
return []
|
|
|
|
|
|
process = CrawlerProcess(settings={
|
|
"TWISTED_REACTOR": "twisted.internet.asyncioreactor.AsyncioSelectorReactor",
|
|
"ASYNCIO_EVENT_LOOP": "uvloop.Loop"
|
|
})
|
|
process.crawl(NoRequestsSpider)
|
|
process.start()
|