title: Running a scrapy program from another python script
body: <p>This question has been kind of answered before but answers are years old.</p>
  
  <p>In my "project" I have 4 spiders and each one of them deals with different kinds of products I encounter (scraping amazon ATM). Each product has a category, for example, if I want to scrape "laptops" I use one scraper but if the objective is to scrape clothes, I have another one.</p>
  
  <p>So, is it there a way to run a python script that, depending on the product I have to scrape (products are read from a txt file) a different spider is called?</p>
  
  <p>Code would look like this</p>
  
  <pre><code>#Imports
  
  def scrapyProject():
  
      #Get the products I want to scrape
      if productIsClothes:
  
          runClothesSpider
  
      else productIsGeneric:
  
          runGenericSpider
  </code></pre>
  
  <p>I know the previous code is rough, It's kind of a sketch for the final code.</p>
  
  <p>It would also help knowing which imports I need for the program to work</p>