python,Windows环境安装及导入beautifulsoup

来源:互联网 发布:网络cv设备 编辑:程序博客网 时间:2024/06/08 09:59

1、执行命令:pip install beautifulsoup4,安装



2、使用时导入BeautifulSoup

3.0以及3.0以下版本,导入语句为:

from BeautifulSoup import BeautifulSoup          # For processing HTMLfrom BeautifulSoup import BeautifulStoneSoup     # For processing XMLimport BeautifulSoup                             # To get everything

4.0版本导入语句为:

from bs4 import BeautifulSoup # To get everything

原创粉丝点击