Update: 初学记、佩文韵府 and 五车韵瑞

This commit is contained in:
denglifan
2026-03-22 16:18:35 +08:00
parent df475fd03f
commit 183b842090
553 changed files with 754048 additions and 169 deletions

10
佩文韵府/test_dump.py Normal file
View File

@@ -0,0 +1,10 @@
from bs4 import BeautifulSoup
with open("html_files/卷001之1.html", "r", encoding="utf-8") as f:
soup = BeautifulSoup(f.read(), "html.parser")
poem_div = soup.find("div", class_="poem")
if poem_div:
for i, p in enumerate(poem_div.find_all("p")[:20]):
print(f"--- P {i} ---")
print(p.text[:100].replace('\n', ' '))