在看时,敲了一些代码,其中报了一个错误为
BeautifulSoup([your markup]) to this: BeautifulSoup([your markup], “lxml”)
`
html = urlopen(“http://en.wikipedia.org“+articleUrl)
bsObj = BeautifulSoup(html)
`
将代码中的 bsObj = BeautifulSoup(html)改为
bsObj = BeautifulSoup(html,'lxml')
即可