ImportError:无法导入名称' CharsetMetaAttributeValue'

时间:2017-09-07 07:23:29

标签: python-3.x beautifulsoup bs4

from bs4 import BeautifulSoup
html_doc='''
html_doc = """
<html><head><title>The Dormouse's story</title></head>
<body>
<p class="title"><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/tillie" class="sister" id="link3">Tillie</a>;
and they lived at the bottom of a well.</p>

<p class="story">...</p>
"""
'''

soup = BeautifulSoup(html_doc)

print(soup.prettify())

那是我的代码。这很容易,但我仍然遇到以下错误:

  

ImportError:无法导入名称&#39; CharsetMetaAttributeValue&#39;

有人可以告诉我为什么吗?

0 个答案:

没有答案