![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
BeautifulSoup
文章平均质量分 70
影子迷鱼
永远不要谈后悔
展开
-
(一)BeautifulSoup的安装
一.BeautifulSoup的安装windows下的安装 确保必要的工作(已经安装好python和pip) 一般在官网下载最新的python时,已经回默认安装好pip了,只要在选择的时候勾选添加到环境变量,就不需要自己手动的设置环境变量。 运行cmd,在命令行中输入一下命令即可安装成功。“` pip install BeautifulSoup4 “`linux下的安装由于本人使用的是ub原创 2016-03-26 21:41:53 · 440 阅读 · 0 评论 -
(二)BeautifulSoup的基本了解使用
BeautifulSoup的基本使用一.BeautifulSoup的基本使用 使用BeautifulSoup可以分为几个步骤: 导入相关的库 from bs4 import BeautifulSoup 初始化BeautifulSoup对象 soup = BeautifulSoup(html,parser) 其中,html为获取得到的页面内容,如: html <html>原创 2016-03-27 01:11:31 · 313 阅读 · 0 评论