import re, html
p = '/home/mantapman/.hermes/profiles/atun/workspace/drafts/kpi/kpi_semua_klien.html'
s = open(p).read()
body = s.split('<tbody>')[1]
for r in re.findall(r'<tr>(.*?)</tr>', body):
    cells = [html.unescape(re.sub('<[^>]+>', '', c)).strip() for c in re.findall(r'<td[^>]*>(.*?)</td>', r)]
    print(' | '.join(cells))
print('---FOOTER---')
print(re.sub('<[^>]+>', ' ', s.split('<footer>')[1]).strip()[:800])
