python3 BeautifulSoup库
2018-03-18 本文已影响7人
lushans
>>> from bs4 import BeautifulSoup
>>> soup1 = BeautifulSoup('<title>html.parser测试</title>','lxml')
>>> print(soup1.title)
<title>html.parser测试</title>
>>> print(soup1.title.text)
html.parser测试