为什么输出title?
时间: 2019-05-16来源:博客园
前景提要
为什么输出title?
0 悬赏园豆: 5 [待解决问题] html="""
<html><head><title>the dormouse's story</title></head>
<body>
<p class="title" name="dromouse"><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" id="link1"><!--elsie--></a>
<a href=" http://example.com/lacie " class="sister" id="link2">lacie</a>and
<a href=" http://example.com/title " class="sister" id="link3">title</a>;
and they lived at the bottom of a well.</p>
<p class="story">...</p>
"""
soup=BeautifulSoup(html,”lxml")
print(soup.title.name)
输出结果为什么是title?不应该是dromouse? lxm_001 | 初学一级 | 园豆: 199
提问于:2019-05-16 20:26 显示帮助
使用"Ctrl+Enter"可进行快捷提交,评论支持部分 Markdown 语法:[link](http://example.com) _italic_ **bold** `code`。
< > 分享
分享您的问题

清除回答草稿
您需要 登录 以后才能回答,未注册用户请先 注册 。

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行