import sys import re with open('tmp_home_current.html', 'r', encoding='utf-8') as f: html = f.read() img_block_str = """
Kevin McKeand
""" if img_block_str in html: print("Found") else: print("Not Found") m = re.search(r'', html, re.DOTALL) if m: print("Regex found:") print(repr(m.group(0))) print("Expected:") print(repr(img_block_str))