title: How can I extract only the main textual content from an HTML page?
body: <h2>Update</h2>
  
  <p>Boilerpipe appears to work really well, but I realized that I don't need only the main content because many pages don't have an article, but only links with some short description to the entire texts (this is common in news portals) and I don't want to discard these shorts text.</p>
  
  <p>So if an API does this, get the different textual parts/the blocks splitting each one in some manner that differ from a single text (all in only one text is not useful), please report.</p>
  
  <hr>
  
  <h2>The Question</h2>
  
  <p>I download some pages from random sites, and now I want to analyze the textual content of the page.</p>
  
  <p>The problem is that a web page have a lot of content like menus, publicity, banners, etc.</p>
  
  <p>I want to try to exclude all that is not related with the content of the page.</p>
  
  <p>Taking this page as example, I don't want the menus above neither the links in the footer.</p>
  
  <p><strong>Important:</strong> All pages are HTML and are pages from various differents sites. I need suggestion of how to exclude these contents. </p>
  
  <p>At moment, I think in excluding content inside "menu" and "banner" classes from the HTML and consecutive words that looks like a proper name (first capital letter).</p>
  
  <p>The solutions can be based in the the text content(without HTML tags) or in the HTML content (with the HTML tags)</p>
  
  <p><strong>Edit:</strong> I want to do this inside my Java code, not an external application (if this can be possible).</p>
  
  <p>I tried a way parsing the HTML content described in this question : <a href="https://stackoverflow.com/questions/7035150/how-to-traverse-the-dom-tree-using-jsoup-doing-some-content-filtering">https://stackoverflow.com/questions/7035150/how-to-traverse-the-dom-tree-using-jsoup-doing-some-content-filtering</a></p>