I'm stuck with getting information from html code with beautifulsoup. I extracted the HTML piece below by doing the following steps:
result = requests.get(url, headers = headers)
soup = BeautifulSoup(result.text, 'lxml')
tably = soup.find("table", id="table4")
last_row = tably.findAll('tr')[-1]
Now, I want to obtain the following output:
Classification: Mass murderer
Characteristics: Militant Al-Takfir wa al-Hijran (Renunciation and Exile) faction
Number of victims: 23
Sample HTML:
<tr>
<td style="font-size: 8pt; color: #000000" width="100%">
<style color="#000000" face="Verdana">
Classification: <b>Mass murderer</b></font></td>
</tr>
<tr>
<td width="100%" style="font-size: 8pt; color: #000000">
<style="font-size: 8pt" color="#000000" face="Verdana">
Characteristics: <b>Militant Al-Takfir wa
al-Hijran </b>(Renunciation and Exile)<b> faction</b></font></td>
</tr>
<tr>
<td width="100%" style="font-size: 8pt; color: #000000">
<style="font-size: 8pt" color="#000000" face="Verdana">
Number of victims: <b>23</b></font></td>
</tr>
</font>