Beautiful Soup 4.4.0 基本使用方法
Beautiful Soup 安装 pip install beautifulsoup4 标准库有html.parser解析器但速度不是很快一般还需安装第三方的解析器:
pip install lxml pip install html5lib
html_doc = """
<html><head><title>The Dormouse's story</title></head>
<body>
<p class="title"><b>The Dormouse's story</b></p>
<p class="story">Once upon a time there were three little sisters; and their names were
<a href="http://example.com/elsie" class="sister" >Elsie</a>]
相关文章: