python3 BeautifulSoup库

>>> from bs4 import BeautifulSoup
>>> soup1 = BeautifulSoup('html.parser测试','lxml')
>>> print(soup1.title)
html.parser测试
>>> print(soup1.title.text)
html.parser测试

你可能感兴趣的:(python3 BeautifulSoup库)