title: Python Scrapy Click on html button
body: <p>I am new to scrapy and using scrapy with python 2.7 for web automation. I want to click on a html button on a website which opens a login form. My problem is that I just want to click on a button and trasfer control to new page. I have read all similar questions but none found satisfactory because they all contain direct login or using selenium. </p>
  
  <p>Below is HTML Code for button and I want to visit <code>http://example.com/login</code> where there is login page.</p>
  
  <pre><code>&lt;div class="pull-left"&gt;
      &lt;a href="http://example.com/login" class="emplink"&gt;Employers&lt;/a&gt;    
  </code></pre>
  
  <p>I have written code for to extract link. But how to visit that link and carry out next process. Below is My code.</p>
  
  <pre><code>import scrapy
  
  class QuotesSpider(scrapy.Spider):
      name = 'pro'
      url =  "http://login-page.com/"
  
  
  def start_requests(self):
      yield scrapy.Request(self.url, self.parse_login)
  
  
  def parse_login(self, response):
      employers = response.css("div.pull-left a::attr(href)").extract_first()
      print employers
  </code></pre>
  
  <p>Do I need to use "yield" Everytime and callback to new fuction for just visiting a link or there is other way to do it.  </p>