# -*- coding: utf-8 -*-
import re
html = open(r'D:\doubao\tmp\酱腌菜电商看板\dashboard.html', encoding='utf-8').read()
print('LENGTH:', len(html))
print('--- headings ---')
for m in re.finditer(r'<h[1-4][^>]*>([^<]+)</h[1-4]>', html):
    print('H:', m.group(1))
print('--- ids ---')
for m in re.finditer(r'id="([^"]+)"', html):
    print('id:', m.group(1))
print('--- data loading ---')
for m in re.finditer(r'(loadData|fetch|fallback|D\.|render[A-Z]\w+\(|data = |DATA=)', html):
    pass
idx = html.find('fallback')
print('fallback at:', idx)
print('--- scripts count ---')
print('script tags:', html.count('<script'))
