I am trying to extract 'Total Marks' from Result using Python 3. The web page is shown in the image, from here, I'm trying to extract the data '515'. The XPath of the content (from Firebug) is shown as:
/html/body/div/div/div/div[3]/div[1]/div/div[2]/div[2]/table/tbody/tr[1]/td[2]/b
The code snippet used is:
summary_data_xpath = '//tbody/tr[1]/td[2]/b/text()'
data = html_tree.xpath(summary_data_xpath)
print(data)
But I get the output: []
I tried using absolute path (XPath given by Firebug). I also tried to start reference from the '//table', but I got the same result.
The two tables are structured as:
...
<div>
<div>
Upper Table with subject marks
</div>
Lower Table with subject marks and division
</div>
...
How can I extract the total marks '515' from the table? Thanks in advance for any assistance!