I'm trying to use BeautifulSoup to collect all the sentences in a website as well as the section they fall under (sections fall under "<strong>" tags). However, I have to account for the fact that sentences can appear in a variety of elements: <p>, <table>, <blockquote>, even inside of a <div>...
I have to account for nested tags too, so as to make sure that I don't collect a sentence more than once. I have tried using soup.find_all(text=True) to bypass that, but that doesn't seem to necessarily go through the website in the order I want (top to bottom). Any advice?