title: click button on website using scrapy
body: <p>I want to ask how about (do crawling) clicking next button(change number page of website) (then do crawling more till the end of page number) from <a href="https://n0where.net/" rel="nofollow noreferrer">this site</a> </p>
  
  <p>I've try to combining scrape with selenium,but its still error and says <code>"line 22
      self.driver = webdriver.Firefox()
         ^
  IndentationError: expected an indented block"</code></p>
  
  <p>I don't know why it happens, i think i code is so well.Anybody can resolve this problem?</p>
  
  <p><strong>This my source :</strong></p>
  
  <pre><code>from selenium import webdriver
  from scrapy.spider import BaseSpider
  from scrapy.selector import HtmlXPathSelector
  from now.items import NowItem
  class MySpider(BaseSpider):
  name = "nowhere"
  allowed_domains = ["n0where.net"]
  start_urls = ["https://n0where.net/"]
  
  def parse(self, response):
      for article in response.css('.loop-panel'):
          item = NowItem()
          item['title'] = article.css('.article-title::text').extract_first()
          item['link'] = article.css('.loop-panel&gt;a::attr(href)').extract_first()
          item['body'] ='' .join(article.css('.excerpt p::text').extract()).strip()
          #item['date'] = article.css('[itemprop="datePublished"]::attr(content)').extract_first()
          yield item
  
  def __init__(self):
      self.driver = webdriver.Firefox()
  
      def parse2(self, response):
      self.driver.get(response.url)
  
      while True:
          next = self.driver.find_element_by_xpath('/html/body/div[4]/div[3]/div/div/div/div/div[1]/div/div[6]/div/a[8]/span')
  
          try:
              next.click()
  
              # get the data and write it to scrapy items
          except:
              break
  
      self.driver.close()`
  </code></pre>
  
  <p><strong>This my capture of my program mate :</strong>
  <a href="https://i.stack.imgur.com/6Y1YC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Y1YC.png" alt="capture program"></a></p>