def get_text(html, from_tag, until_tag):
    soup = bs(html)
for big in soup(from_tag):
    until = big.findNext(until_tag)
strings = (node for node in big.nextSiblingGenerator() if getattr(node,
    'text', '').strip())
selected = takewhile(lambda node: node != until, strings)
try:
    yield ''.join(getattr(node, 'text', '') for node in chain([big, next(
        selected)], selected))
except StopIteration as e:
    pass
for text in get_text(html, 'big', 'a'):
    pass
How to get all text between just two specified tags using BeautifulSoup?