from docx import Document
from docx import RT
import re
d=Document("./liu2.docx")
for p in d.paragraphs:
rels = d.part.rels
for rel in rels:
if rels[rel].reltype == RT.HYPERLINK:
print("\n 超链接文本为", rels[rel], " 超链接网址为: ", rels[rel]._target)
python docx的超链接网址和链接文本
最新推荐文章于 2024-08-24 10:34:22 发布