Let's assume we have code:
<tr class=" " somethingc1="" somethingc2="" somethingc3="" data-something="1" something="1something4" something_id="6something7">
<td class="text-center td_something">
<div>
<span doo="true" class="foo" style="left:70%;z-index:99;">
<span doo="true" class="foo" style="left:50%;z-index:90;">
<span doo="true" class="Kung foo" style="left:90%;z-index:95;">
</div>
</td>
</tr>
<tr class=" " somethingc1="" somethingc2="" somethingc3="" data-something="1" something="1something4" something_id="6something7">
<td class="text-center td_something">
<div>
<span doo="true" class="Kung foo" style="left:35%;z-index:95;">
</div>
</td>
</tr>
<tr class=" " somethingc1="" somethingc2="" somethingc3="" data-something="1" something="1something4" something_id="6something7">
<td class="text-center td_something">
<div>
<span doo="true" class="foo" style="left:99%;z-index:100;">
</div>
</td>
</tr>
How may I make a list using Bs4 in Python to find the highest value of 'left' in 'style' attrs keeping in mind that I do not want to take into consideration spans with class_ "Kung"
Desired result would be:
[70,False or NaN,99]
I've got it I should start with something like:
trs = soup.find_all('tr', attrs={"data-something": "1"})
List = list()
find_all('span',{'style': re.compile(r'^left:.')})