execute some logic before sending the first request in scrapy spider code example Example: scrapy create project scrapy startproject projectname