title: Scrapy - How can I obtain the 'src' value for a 'script' tag
body: <p>I'm trying to obtain the 'src' values for 'script' tags using Scrapy (<a href="http://scrapy.org/" rel="nofollow">http://scrapy.org/</a>).</p>
  
  <p>I can do this no problem for images:</p>
  
  <pre><code>for sel in response.xpath('//img'):
      item = elSRC()
      item['src'] = sel.xpath('@src').extract()
      yield item
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>{"src": ["http://ecx.images-amazon.com/images/I/51UBHVgfefL._AC_SX75_.jpg"]},
  </code></pre>
  
  <p>However, the same thing for a script tag doesn't seem to work:</p>
  
  <pre><code>for sel in response.xpath('//script'):
          item = elSRC()
          item['src'] = sel.xpath('@src').extract()
          yield item
  </code></pre>
  
  <p>Sample output:</p>
  
  <pre><code>{"src": []},
  </code></pre>
  
  <p>I confirmed manually that the script tags on the page in question did indeed have 'src' values present.  I've also tried a number of other approaches utilizing the Scrapy shell to no avail.</p>
  
  <p>Has anyone else been able to obtain the 'src' values for a 'script' tag using Scrapy, and if so how did you do it?</p>
  
  <p>Thanks!</p>