# only once for each file with notes cssexist = re.search(r'\.\.\/Styles\/footnote\.css', html) if not cssexist: