我正在尝试导入BeautifulGroup,但运行脚本时遇到错误:Traceback (most recent call last):
File "LinkCrawler.py", line 5, in
from bs4 import BeautifulSoup
File "/Users/ivanyurchenko/Documents/Projects/crawler/bs4/__init__.py", line 29, in
from .builder import builder_registry
File "/Users/ivanyurchenko/Documents/Projects/crawler/bs4/builder/__init__.py", line 294, in
from . import _htmlparser
File "/Users/ivanyurchenko/Documents/Projects/crawler/bs4/builder/_htmlparser.py", line 7, in
from html.parser import (
ImportError: cannot import name 'HTMLParseError'
我尝试过安装/更新Beauthulsoup包,但没有任何乐趣:
^{pr2}$
我对python不是很熟悉。谁能告诉我我做错了什么吗?在
UPD:我需要一个webcrawler,所以我在github上找到了一个示例项目,现在正努力让它工作起来。您可以看到它的代码here。在