I'm trying to extract the text inside from the following html structure:

```
<div class="account-places">
    <div>
        <ul class="location-history">
            <li></li>
            <li>Text to extract</li>
        </ul>
    </div>
</div>

```

I have the following BeautifulSoup code to do it:

```
from bs4 import BeautifulSoup as bs

soup = bs(html, "lxml")
div = soup.find("div", {"class": "account-places"})
text = div.div.ul.li.next_sibling.get_text()

```

But Beautiful Soup is throwing the error: 'NavigableString' object has no attribute 'get\_text'. What am I doing wrong?