Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.6k views
in Technique[技术] by (71.8m points)

有没有什么可以优化文段排版的Python第三方库?

我用爬虫在网上抓了一些招标信息的网页,然后用Beautiful Soup库提取出主体文本写入word,但是相应的网页上的排版格式也就没了
image.png
请问python有什么第三方库可以对这样的文本数据进行自动重拍格式吗?
又或者我想从源网页上爬取到带排版的文本写入到word中,有什么其他方法吗?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

如果这个招标信息是一个富文本的话,你可以直接把这个元素连同html内容爬下来然后转为word。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...