title: How to fetch data from a webpage and paste it into excel
body: <p>I'm trying to fetch some info from this <a href="http://ae.bizdirlib.com/node/946273" rel="nofollow">Link</a>. The data i wanna fetch is that company name, email, phone, location and paste it in the excel sheet. Please suggest some fromework / a way to scrape the data and write it to the xls. I know xlwt is one framework.</p>
  
  <p>The code i have written to open a tab and fetch info is given below: </p>
  
  <pre><code>from selenium import webdriver
  from selenium.common.exceptions import NoSuchElementException
  from selenium.webdriver.common.keys import Keys
  import time
  
  
  browser = webdriver.Firefox() # Get local session of firefox
  
  # 0 wait until the pages are loaded
  browser.implicitly_wait(3) # 3 secs should be enough. if not, increase it
  
  browser.get("http://ae.bizdirlib.com/taxonomy/term/1493") # Load page
  #links =[]
  #link=browser.find_elements_by_class_name('term-listing-heading')
  #links = browser.find_elements_by_css_selector("h2 &gt; a")
  
  #print link
  #for link in links:
  #    link.send_keys(Keys.CONTROL + Keys.RETURN)
  #    link.send_keys(Keys.CONTROL + Keys.PAGE_UP)
  #    time.sleep(2)
  #    link.send_keys(Keys.CONTROL + 'w')
  </code></pre>