title: How to extract table from SEC N-Q doc using BeautifulSoup
body: <p>(python 2.7, BeautifulSoup4)</p>
  
  <p>I am trying to extract the table contents from SEC N-Q documents. Sample html here: <a href="https://www.sec.gov/Archives/edgar/data/36405/000093247115006447/indexfunds_final.htm" rel="nofollow">https://www.sec.gov/Archives/edgar/data/36405/000093247115006447/indexfunds_final.htm</a></p>
  
  <p>The file has no tag at all. I want to search for section 'C. Futures Contract' and look for the next &lt; table > and extract the contents in &lt; tr >. There are multiple 'C. Futures Contract' occurrences in one document too.</p>
  
  <p>I've tried the following code but got nothing.</p>
  
  <pre><code>import requests, re
  from bs4 import BeautifulSoup
  r = requests.get("https://www.sec.gov/Archives/edgar/data/36405/000093247115006447/indexfunds_final.htm")
  futures = soup.find_all(re.compile('C. Futures Contract'))
  print futures
  </code></pre>
  
  <p>[ ]</p>