title: Scrapy: fail to re-run in Jupyter Notebook script, reporting ReactorNotRestartable
body: <p>My scrapy code goes like this:</p>
  
  <pre><code>import scrapy
  from scrapy.crawler import CrawlerProcess
  
  class MovieSpider(scrapy.Spider):
      name = "movies"
      start_urls = [
          'https://movie.douban.com/subject/25934014/',
          'https://movie.douban.com/subject/25852314/',
      ]
  
      def parse(self, response):
          title = response.css('div#wrapper div#content h1 span::text').extract_first()
          year = response.css('div#wrapper div#content h1 span.year::text').extract_first()
          yield {
              'url': response.url,
              'title': title,
              'year': year,
          }
  </code></pre>
  
  <p>And I run it like this</p>
  
  <pre><code>process = CrawlerProcess({
      'USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)',
      'FEED_FORMAT': 'json',
      'FEED_URI': 'movie.json',
      'FEED_EXPORT_ENCODING':'utf-8'
  })
  
  process.crawl(MovieSpider)
  process.start() #
  </code></pre>
  
  <p>which is the recommanded way in <a href="https://doc.scrapy.org/en/latest/topics/practices.html#run-scrapy-from-a-script" rel="nofollow noreferrer">docs</a>. </p>
  
  <p>The problem is that, after I run the above script, I can't run it again. Jupyter notebook returns the error <code>ReactorNotRestartable</code></p>
  
  <p><a href="https://i.stack.imgur.com/9Rcsd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9Rcsd.png" alt="enter image description here"></a></p>
  
  <p>If I re-start the kernel in jupyter, it will be fine to run for the first time. </p>
  
  <p>I think the problem is stated in <a href="https://stackoverflow.com/questions/14777910/scrapy-crawl-from-script-always-blocks-script-execution-after-scraping">Scrapy crawl from script always blocks script execution after scraping</a></p>
  
  <p>and I might be possible to solve this problem by using their code. However, their code is quite complex for such a small thing, and far from the <code>CrawlerProcess</code> way which is recommended in the docs. </p>
  
  <p>I'm wondering if there is better way to solve this problem?</p>
  
  <p>I tried adding <code>process.stop()</code> at the end of script. It didn't help.</p>