Getting the content of a  tag inside a  class="some_class"> tag using Beautiful Soup in Python
If you have only one div tag and only one p tag in it, you can do this:
content = soup.findAll('div', class_= 'some_class')[0].findAll('p')[0].contents[0]
I have a HTML code having a div tag with class="some_class". And there is a p tag inside this div tag:
<div class="some_class">
<p>blah blah blah...</p>
</div>
I need to get the p tag's content and store it in a variable.
I did it in two steps:
1)Get the div tag using findAll('div', class_='some_class'),
2)Using split at the p tag
Is there any direct way of doing this without having to do the complex splitting?