title: Tag contains text, but also another tag with text. How do I get the text, but not the text within the extra tag with beautifulsoup python?
body: <p>I have the following tag:</p>
  <pre><code>&lt;div class=&quot;example_class&quot;&gt;
   &lt;b&gt;
   &lt;img src=&quot;image_source&quot;/&gt;
            extra infomation
            &lt;a href=&quot;reference&quot;&gt;
             extra information
            &lt;/a&gt;
   &lt;/b&gt;
           .
           &lt;br/&gt;
   &lt;br/&gt;
           This is the text I want to get.
           &lt;lt&gt;
   &lt;/lt&gt;
           br /
           &lt;gt&gt;
  &lt;/gt&gt;
  &lt;lt&gt;
  &lt;/lt&gt;
           br /
           &lt;gt&gt;
  &lt;/gt&gt;
  &lt;lt&gt;
  &lt;/lt&gt;
           br /
           &lt;gt&gt;
  &lt;/gt&gt;
           This is the rest of the text.
  &lt;/div&gt;
  </code></pre>
  <p>I want to get the text 'This is the text I want to get. This is the rest of the text.', but I don't know how. When I try the following:</p>
  <pre class="lang-py prettyprint-override"><code>soup_result = soup.find('div',{'class': 'example_class'})
  result = soup_result.get_text()
  </code></pre>
  <p>I get:</p>
  <pre><code>'\n\n\n         extra information\n         \n          extra information\n         \n\n        .\n        \n\n        This is the text I want to get.\n        \n\n        br /\n        \n\n\n\n        br /\n        \n\n\n\n        br /\n        \n\n        This is the rest of the text.'
  </code></pre>
  <p>How do I make sure 'extra information' and the newlines with a lot of whitespaces in between are not in the result?</p>