mirror of https://github.com/scrapy/scrapy.git
20 lines
399 B
Python
20 lines
399 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()
|