The crawlers can run as normal python script. This can be done by running from the project path, where we have the scrapy.cfg file. (just path it has nothing to do with scrapy.cfg )
from twisted.internet import reactor
from scrapy.crawler import Crawler
from scrapy import log, signals
create a Obj with SpiderName
spider = SampleSpider(arguments_you_want_intialize_tht_object)
settings = get_project_settings()
crawler = Crawler(settings)
crawler.signals.connect(reactor.stop, signal=signals.spider_closed)
crawler.configure()
crawler.crawl(spider)
crawler.start()
reactor.run()
We can add this code in the CGI Script to invoke the Spider.