title: How to extract tables from websites in Python
body: <p>Here, </p>
  
  <pre><code>http://www.ffiec.gov/census/report.aspx?year=2011&amp;state=01&amp;report=demographic&amp;msa=11500
  </code></pre>
  
  <p>There is a table. My goal is to extract the table and save it to a csv file. I wrote a code:</p>
  
  <pre><code>import urllib
  import os
  
  web = urllib.urlopen("http://www.ffiec.gov/census/report.aspx?year=2011&amp;state=01&amp;report=demographic&amp;msa=11500")
  
  s = web.read()
  web.close()
  
  ff = open(r"D:\ex\python_ex\urllib\output.txt", "w")
  ff.write(s)
  ff.close()
  </code></pre>
  
  <p>I lost from here. Anyone who can help on this? Thanks!</p>