I’m using BeautifulSoup to parse the HTML you provided.
Then I navigate the soup using the spans. After I have the target element, I get the text of the element.
soup.span.span.text
or
This finds all spans and selects the second one.
soup.find_all('span')[1]
I have this additional code before calling either of those.
from bs4 import BeautifulSoup
html = "<span class="posting-location go-to-posting">Santa Gertrudes , <span> Tatuapé, São Paulo</span></span>"
soup = BeautifulSoup(html, 'html.parser')