Search

BeautifuSoup

Python BeautifulSoup Grab All Text Inside Html-Tag-Block

BeautifulSoup Dispose of a very Nice function that permit to Grab all the Text Contained Inside a Tag-Block.

For Example if you have an Html block to Parse like this:

<div class="first">
    <h3 class="second">The Title</h3>
    <a class="second">The Anchor
           <span class="third">The Span</a>
    </a>
</div>

And you need to Get all the simple Text Contained inside of the Block marked by the <div> Tag.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer