(v365env) ➜ music163-spiders git:(master) ✗ python get_artists.py
Traceback (most recent call last):
File "get_artists.py", line 44, in <module>
get_artists(url)
File "get_artists.py", line 26, in get_artists
soup = BeautifulSoup(r.text, 'html5lib')
File "/Users/qk/.pyenv/versions/v365env/lib/python3.6/site-packages/bs4/__init__.py", line 198, in __init__
% ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
(v365env) ➜ music163-spiders git:(master) ✗ python --version
Python 3.6.5
(v365env) ➜ music163-spiders git:(master) ✗ pip install requests BeautifulSoup4
Requirement already satisfied: requests in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (2.20.1)
Requirement already satisfied: BeautifulSoup4 in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (4.6.3)
Requirement already satisfied: idna<2.8,>=2.5 in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (from requests) (2.7)
Requirement already satisfied: certifi>=2017.4.17 in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (from requests) (2018.10.15)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (from requests) (1.24.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Users/qk/.pyenv/versions/3.6.5/envs/v365env/lib/python3.6/site-packages (from requests) (3.0.4)
(v365env) ➜ music163-spiders git:(master) ✗ python get_artists.py
Traceback (most recent call last):
File "get_artists.py", line 44, in <module>
get_artists(url)
File "get_artists.py", line 26, in get_artists
soup = BeautifulSoup(r.text, 'html5lib')
File "/Users/qk/.pyenv/versions/v365env/lib/python3.6/site-packages/bs4/__init__.py", line 198, in __init__
% ",".join(features))
bs4.FeatureNotFound: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
参考例子:
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.