import sys
file_path = "/home/x79/sisvietnamvn_01/sisvietnamvn_Trang chính thức hiện tại/UMass Amherst _ UMass Amherst.html"
with open(file_path, "r", encoding="utf-8") as f:
lines = f.readlines()
start_idx = -1
for i, line in enumerate(lines):
if '
' in line:
start_idx = i
break
if start_idx == -1:
print("Could not find
")
sys.exit(1)
extracted = []
div_count = 0
found_start = False
for line in lines[start_idx:]:
# Simple tag counting to find the matching closing div
# Note: this is a naive counter, it doesn't account for HTML comments or script tags containing strings that look like tags,
# but it usually works well for standard HTML layout sections.
div_count += line.count("