title: Scrapy + phantomjs + selenium raise NotImplementedError
body: <p>I'm trying to scrape a page with some javascript elements, I've made this, which has a part to pass the 302  (that I tested and it works fine):</p>
  
  <pre><code>class bllanguage(scrapy.Spider):
      handle_httpstatus_list = [302]
      name = "bllanguage"
      allowed_domains = ["http://explore.com/"]
      start_urls = [
      'http://explore.com/this-other-url'
      ]
  
      def __init__(self):
              driver = webdriver.PhantomJS(executable_path='/usr/local/bin/phantomjs')
  
  
      def start_requests(self):
          for u in self.start_urls:
              r = scrapy.Request(url = u, dont_filter=True, callback=self.parse)
              r.meta['dont_redirect'] = True
              yield r
  
          def parse(self, response):
                  driver.get(response.url)
                  print response.url
  </code></pre>
  
  <p>It gives me this error:</p>
  
  <blockquote>
    <p>Traceback (most recent call last):
          File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line
    577, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/usr/lib/pymodules/python2.7/scrapy/spiders/<strong>init</strong>.py", line 76, in parse
            raise NotImplementedError
        NotImplementedError</p>
  </blockquote>
  
  <p>I can't understand what I'm making wrong, if somebody could gives me an hint, it will be great.</p>
  
  <p>EDIT:
  As @paul trmbrth said, I had to put "def parse" in the same indentation of "def start_requests". But now I have this:</p>
  
  <blockquote>
    <p>line 30, in parse
        driver.get(response.url)
    NameError: global name 'driver' is not defined</p>
  </blockquote>
  
  <p>But I defined it in def <strong>_ init _</strong>: why that?</p>