使用python 提取html文件中的特定數據

python提供了SGMLParser類用於html文件的解析。用戶只需從SGMLParser類繼承子類,並在子類中對html文件作具體處理。 例如 具備以下結構的html文件html <div class='entry-content'> <p>感興趣內容1</p> <p>感興趣內容2</p> …… <p>感興趣內容n</p> </div> <div class='content'> <p>內容
相關文章
相關標籤/搜索