title: Scrapy global name substring is not defined
body: <p>I'm trying to extract a particular piece of text with Scrapy.</p>
  
  <p>Here is my code </p>
  
  <pre><code>        item['movie_director'] = movie.xpath(substring-before(substring-after(span[1]/text(), 'Director :  '), '.')).extract()
  </code></pre>
  
  <p>The format is :
    <em>Director : Director's name.</em></p>
  
  <p>And I want to extract only this : 
    <em>Director's name</em></p>
  
  <p>But when I set the crawler, I have this error : global name 'substring' is not defined.</p>
  
  <p>I thought the use of substring was included. Is there a way to import this ?</p>
  
  <p>Thank you for your help.</p>