title: What is wrong with my web scraper code (python3.4)
body: <p>I am trying to scrape a table from a website. It runs but I am not getting an output to my file. Where am I going wrong?</p>
  
  <p>Code:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  
  import urllib.request
  
  f = open('nbapro.txt','w')
  errorFile = open('nbaerror.txt','w')
  
  page = urllib.request.urlopen('http://www.numberfire.com/nba/fantasy/full-fantasy-basketball-projections')
  
  content = page.read()
  soup =  BeautifulSoup(content)
  
  tableStats = soup.find('table', {'class': 'data-table xsmall'})
  for row in tableStats.findAll('tr')[2:]:
   col = row.findAll('td')
  
   try: 
      name = col[0].a.string.strip()
      f.write(name+'\n')
   except Exception as e:
      errorFile.write (str(e) + '******'+ str(col) + '\n')
      pass
  
  f.close
  errorFile.close
  </code></pre>