File size: 320 Bytes
34ad4eb
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14

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('fetch("/predict"')
if idx != -1:
    print(f"Found 'fetch' at {idx}")
    print(f"Context: {content[idx-200:idx+800]}")
else:
    print("Not found")