1 在命令行下输入:pip install beautifulsoup4 # 注意:同样的,如果使用pycharm,需要在file-setting中project interpreter下安装库才能正常使用 1. 2. 3. 导入库: 1 from bs4 import BeautifulSoup 2 #注意 导入的 beautifulsoup模块中,b和s需要大写 3 soup = BeautifulSoup('data',html.parser') 4 # 两个参...