Python爬虫小记(二)
来源:互联网 发布:php工程师 编辑:程序博客网 时间:2024/06/09 07:59
from bs4 import BeautifulSouphtml = urlopen("http://dblp.uni-trier.de/db/conf/www/www2017.html")bsObj = BeautifulSoup(html, 'lxml')nameList = bsObj.findAll("div", {"id": "main"})# for name in nameList:# print(name.div.a.find("img")['src'])for i in range(len(nameList)): print(nameList[i].div.a.find("img")["alt"])for i in range (len(nameList)): print(nameList[i].div.a.find("img").parent["href"])
获得结果:dblp computer science bibliography
http://dblp.uni-trier.de
阅读全文
1 0
- Python爬虫小记(二)
- Python爬虫小记(一)
- Python爬虫小记(三)
- python 爬虫小记
- Python + Selenium 爬虫小记
- python爬虫小记
- Python爬虫入门小记
- python 爬虫小记之一
- python 爬虫(二)
- python爬虫(二)
- python爬虫(二)
- Python 爬虫(二)
- Python爬虫(二)图片下载爬虫
- Python爬虫整理(二)
- python简单爬虫(二)
- python 爬虫笔记(二)
- python网络爬虫(二)
- Python爬虫实战(二)
- tomcat性能优化
- CentOS 使用yum命令安装出现错误提示:Loaded plugins: fastestmirror, refresh-packagekit, security
- CentOS 7.0下使用yum安装MySQL
- gcc编译过程
- Ajax常用参数类型解析
- Python爬虫小记(二)
- 在jsp页面中添加富文本编译器(ueditor)+ 图片上传功能
- 1002. 写出这个数 (20)
- iconfont矢量图标
- 2017 ACM/ICPC Asia Regional Qingdao Online 1011(数学知识)
- 哈希计划(河南省多校联盟第六次)
- ZooKeeper之会话(session)
- jxl 生成excel
- Python 类方法,静态方法,实例化方法