BeautifulSoup模块学习
来源:互联网 发布:管理类联考网络冲刺班 编辑:程序博客网 时间:2024/06/03 15:21
转载博客地址:http://cuiqingcai.com/1319.html
创建 Beautiful Soup 对象
from bs4 import BeautifulSoup
我们创建一个字符串,后面的例子我们便会用它来演示
html = """<html><head><title>The Dormouse's story</title></head><body><p class="title" name="dromouse"><b>The Dormouse's story</b></p><p class="story">Once upon a time there were three little sisters; and their names were<a href="http://example.com/elsie" class="sister" id="link1"><!-- Elsie --></a>,<a href="http://example.com/lacie" class="sister" id="link2">Lacie</a> and<a href="http://example.com/tillie" class="sister" id="link3">Tillie</a>;and they lived at the bottom of a well.</p><p class="story">...</p>"""
创建 beautifulsoup 对象
soup = BeautifulSoup(html,'lxml')
0 0
- Python学习-BeautifulSoup模块
- BeautifulSoup模块学习
- Python学习笔记:BeautifulSoup模块
- Python学习笔记--BeautifulSoup、urllib、threading模块
- BeautifulSoup模块
- Beautifulsoup模块
- Python学习---BeautifulSoup安装(第三方模块)
- beautifulsoup 学习
- BeautifulSoup学习
- python中的BeautifulSoup模块
- 安装BeautifulSoup模块
- python 中 BeautifulSoup 模块
- 爬虫----BeautifulSoup 模块
- python:BeautifulSoup 模块使用指南
- python:BeautifulSoup 模块使用指南
- python:BeautifulSoup 模块使用指南
- Python BeautifulSoup模块
- python:BeautifulSoup 模块使用指南
- linux下nfs配置
- myeclipse最常用的快捷键
- 欢迎使用CSDN-markdown编辑器
- Android开源库和项目
- POJ 2391 二分,Floyd, 网络最大流
- BeautifulSoup模块学习
- hdu1269迷宫城堡
- 神经网络浅讲:从神经元到深度学习
- 将本地项目上传至GitHub上
- bzoj 3160: 万径人踪灭 (FFT+manacher)
- Spring 核心技术——IoC 之 DI (2)
- 经典查找算法 --- B+树
- hdu--1045--Fire Net,NYOJ--587--dfs--blockhouses
- CF 767A