title: How to run scrapy spider with arguments inside django view
body: <p>The user could input keyword in a form and submit it, so I can get the keyword in the views. Then I can make the start_url with the keyword.
  How can I pass the start_url to a scrapy spider and start it?</p>
  
  <p>This is my view method.</p>
  
  <pre><code>def results(request):
      """Return the search results"""
      key= request.GET['keyword'].strip()
      books = Book.objects.filter(title__contains=key)
      if books is None:
          # I want to call the scrapy spider here.
          pass
          books = Book.objects.filter(title__contains=key)
      context = {'books': books, 'key': title}
      return render(request, 'search/results.html', context)
  </code></pre>
  
  <p>This is the <strong>init</strong>() method of my spider class. </p>
  
  <pre><code>def __init__(self, key):
      self.key = key
      url = "http://search.example.com/?key=" + key
      self.start_urls = [url]
  </code></pre>