bs4.find_all()搜索文档树和css选择器提取解析后的html数据
from bs4 import BeautifulSoup
html = '''
<html>
<head>
<title>Page Title</title>
</head>
<body>
<div class="info" float="left">welcome</div>
<div class="info" float="right">
<p class="text">A paragraph</p>
<span>spider</span>
<strong><!--this is a comment-->strong</strong>
</div>
</body>
</html>
'''
soup = BeautifulSoup(html, 'html.parser')