Span is not a sibling, it is a child grandparents siblingsonce deleted (thanks, 1.618).
from bs4 import BeautifulSoup as bs
soup = bs("""<td class="yfnc_tablehead1" width="74%">Market Cap (intraday)
<font size="-1"><sup>5</sup></font>:</td><td class="yfnc_tabledata1">
<span id="yfs_j10_aal">33.57B</span></td></tr>""")
soup.find("sup", text="5").parent.parent.find_next_sibling("td").find("span").text
Since you have problems with this, here is my full script test (using python-requests ) that works reliably for me
import requests
from bs4 import BeautifulSoup as bs
url = "https://finance.yahoo.com/q/ks?s=AAL+Key+Statistics"
r = requests.get(url)
soup = bs(r.text)
HTML_MarketCap = soup.find("sup", text="5").parent.parent.find_next_sibling("td").find("span").text
print HTML_MarketCap
source
share