39292-vm/update_block8.py
2026-03-26 19:53:55 +00:00

14 lines
431 B
Python

import re
with open("tmp_home.html", "r", encoding="utf-8") as f:
content = f.read()
block8_pattern = re.compile(r'<!-- KMC EIGHTH SECTION START -->.*?<!-- KMC EIGHTH SECTION END -->', re.DOTALL)
with open("new_block8.html", "r", encoding="utf-8") as f:
block8_new = f.read()
new_content = block8_pattern.sub(block8_new, content)
with open("tmp_home_updated.html", "w", encoding="utf-8") as f:
f.write(new_content)