网络爬虫规则(二)

来源:互联网 发布:数据擦除软件 编辑:程序博客网 时间:2024/05/15 07:25

BeautifulSoup库的安装:

中文文案:Beautiful Soup 4.2.0 文档

安装方法:pip install beautifulsoup4 

使用方法:   from bs4 import BeautifulSoup  或者  import bs4 

html.parser 的作用是制定解析器是html格式的parser,一共可用四种解析器


BeautifulSoup对应一个HTML/XML文档的全部内容




原创粉丝点击