提出HTML中的文本 使用NTLK,参考自Shatu的代码如下: 1234567 import nltkfrom urllib import urlopenurl = "http://news.bbc.co.uk/2/hi/health/2284783.stm"html = urlopen(url).read()raw = nltk.clean_html(html)print(raw) 将HTML文件转化为Markdown 参考aaronsw/html2text/html2text.py 参考 Extracting text from HTML file using Python aaronsw/html2text 赞微海报分享
近期评论