title: Faster alternative to BeautifulSoup for parsing visible text in an html file
body: <p>I have a directory with 50,000 html files in it. For each of the files I want to find 'visible' texts (text data that would actually be visible to a person viewing the file in a browser). I've seen some fine solutions using libraries such as BeautifulSoup, but I want something faster.</p>
  
  <p>A regex based solution I wrote wasn't much faster.</p>
  
  <p>Would I speed things up by using some kind of file stream reader in python? What other faster alternatives are there?</p>
  
  <p>(I'm happy to lose some accuracy by not using trusted parsers like BeautifulSoup if the solution is faster).</p>
  
  <p>EDIT:</p>
  
  <p>Fast enough = 5 minutes. Faster &lt;= 1.3 hours (That's if BeautifulSoup takes an average of a 10th of a second to parse each file, which seems optimistic based on previous work I've been using it for)</p>