# -*- coding: utf-8 -*-
import io, sys, os, json
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
BASE = r"D:\work buddy\2026-11-05-14-15-52"
raw = json.load(open(os.path.join(BASE,"raw_harvard.json"), encoding="utf-8"))
page1 = [
 {"text":"African and African American Studies","href":"https://gsas.harvard.edu/program/african-and-african-american-studies","deg":"Doctor of Philosophy (PhD)"},
 {"text":"American Studies","href":"https://gsas.harvard.edu/program/american-studies","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Anthropology","href":"https://gsas.harvard.edu/program/anthropology","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Applied Mathematics","href":"https://gsas.harvard.edu/program/applied-mathematics","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Applied Physics","href":"https://gsas.harvard.edu/program/applied-physics","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Architecture, Landscape Architecture, and Urban Planning","href":"https://gsas.harvard.edu/program/architecture-landscape-architecture-and-urban-planning","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Astronomy","href":"https://gsas.harvard.edu/program/astronomy","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Bioengineering","href":"https://gsas.harvard.edu/program/bioengineering","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Biological and Biomedical Sciences","href":"https://gsas.harvard.edu/program/biological-and-biomedical-sciences","deg":"Doctor of Philosophy (PhD)"},
 {"text":"Biological Sciences in Public Health","href":"https://gsas.harvard.edu/program/biological-sciences-public-health","deg":"Doctor of Philosophy (PhD)"},
]
seen={p["href"] for p in raw}
for p in page1:
    if p["href"] not in seen:
        raw.append(p); seen.add(p["href"])
json.dump(raw, open(os.path.join(BASE,"raw_harvard.json"),"w",encoding="utf-8"), ensure_ascii=False, indent=1)
print("合并后总数:", len(raw))
