# -*- coding: utf-8 -*-
import io, sys, os, re, html
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
os.chdir(r"D:\work buddy\2026-11-05-14-15-52")
def clean(fn):
    t=open(fn,encoding="utf-8").read()
    t=html.unescape(re.sub(r"<script.*?</script>","",t,flags=re.S))
    t=html.unescape(re.sub(r"<style.*?</style>","",t,flags=re.S))
    t=re.sub(r"<[^>]+>"," ",t); return html.unescape(re.sub(r"\s+"," ",t))
for name in ["mfin-cur","mm-cur","mmkt-cur"]:
    t=clean("_17_"+name+".txt")
    i=t.find("Required Course")
    if i<0: i=t.find("Required")
    print("\n"+"="*15,name)
    print(t[i:i+1100])
