import os html_path = 'e:/Deepfake/deepfake_detector/templates/index.html' with open(html_path, 'r', encoding='utf-8') as f: content = f.read() idx = content.find('Analyze') # case sensitive? maybe "ANALYZE" if idx == -1: idx = content.find('analyze') if idx == -1: idx = content.find('Predict') if idx != -1: print(f"Found at {idx}") print(f"Context: {content[idx-100:idx+300]}") else: print("Not found")