python3.4.3 安装BeautifulSoup4:
使用pip install 安装:
在命令行cmd之后输入,pip install BeautifulSoup4
BeautifulSoup4的使用:
问题:
1. 文档中这样写的 soup.select("p nth-of-type(3)"),在尝试时遇到错误'Unsupported or invalid CSS selector: "%s"' % token?
原因是不支持这样语法,改为这样soup.select("p:nth-of-type(3)")就好了。