extracting text just after a particular tag using beautifulsoup?
Thanks for all your answers but i was able to do this by following:
b_el = soup.find('strong',text='Name:')
print b_el.next_sibling
This works fine for me. This prints just next sibling how can i print next 2 sibling is there anyway ?
I need to extract the text just after strong tag from html page given below? how can i do it using beautiful soup. It is causing me problem as it doesn't have any class or id so only way to select this tag is using text.
{strong}Name:{/strong} Sam smith{br}
Required result
Sam smith