>>> from bs4 import BeautifulSoup
>>> soup1 = BeautifulSoup('<title>html.parser测试</title>','lxml')
>>> print(soup1.title)
<title>html.parser测试</title>
>>> print(soup1.title.text)
html.parser测试
>>> from bs4 import BeautifulSoup
>>> soup1 = BeautifulSoup('<title>html.parser测试</title>','lxml')
>>> print(soup1.title)
<title>html.parser测试</title>
>>> print(soup1.title.text)
html.parser测试
本文标题:python3 BeautifulSoup库
本文链接:https://www.haomeiwen.com/subject/aemsqftx.html
网友评论