要用BeautifulSoup的select方法提取这个标签里面的内容的表示方法:
把里面的空格的位置换成 . 就可以了
soup = BeautifulSoup(html, ‘lxml’)
content = soup.select(‘div.sp-lexicon-word-comment.clearfix’)
要用BeautifulSoup的select方法提取这个标签里面的内容的表示方法:
把里面的空格的位置换成 . 就可以了
soup = BeautifulSoup(html, ‘lxml’)
content = soup.select(‘div.sp-lexicon-word-comment.clearfix’)