File size: 434 Bytes
34ad4eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

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")