资源简介
python爬取百度百科的页面主要用BeautifulSoup ,urllib2等
代码片段和文件信息
# coding=UTF-8
‘‘‘
Created on 2017年4月4日
@author: zwl
‘‘‘
import urllib2
class HtmlDownloader(object):
def download(self url):
if url is None:
return None
response = urllib2.urlopen(url);
if response.getcode() != 200 :
return None
return response.read()
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-04 20:50 test\
文件 375 2017-03-30 20:26 test\.project
文件 431 2017-03-30 20:26 test\.pydevproject
目录 0 2017-03-30 21:36 test\.settings\
文件 109 2017-04-05 11:04 test\.settings\org.eclipse.core.resources.prefs
目录 0 2017-04-05 11:24 test\baike_spider\
文件 380 2017-04-05 11:05 test\baike_spider\html_downloader.py
文件 760 2017-04-05 11:05 test\baike_spider\html_downloader.pyc
文件 876 2017-04-05 11:04 test\baike_spider\html_outputer.py
文件 1470 2017-04-05 11:05 test\baike_spider\html_outputer.pyc
文件 1446 2017-04-05 11:24 test\baike_spider\html_parser.py
文件 1786 2017-04-05 11:24 test\baike_spider\html_parser.pyc
文件 41 2017-04-05 11:30 test\baike_spider\output.html
文件 1343 2017-04-05 11:04 test\baike_spider\spider_main.py
文件 804 2017-04-05 11:17 test\baike_spider\url_manager.py
文件 1573 2017-04-05 11:24 test\baike_spider\url_manager.pyc
文件 0 2017-04-04 20:50 test\baike_spider\__init__.py
文件 136 2017-04-05 11:01 test\baike_spider\__init__.pyc
目录 0 2017-03-30 21:35 test\test\
文件 846 2017-04-04 20:56 test\test\test_bs4.py
文件 700 2017-03-30 21:07 test\test\test_urllib2.py
文件 0 2017-03-30 20:26 test\test\__init__.py
- 上一篇:Python读取栅格并计算
- 下一篇:Tkinter+SQLite实现账号密码存储
相关资源
- Instant Pygame for Python Game Development How
- Biopython Tutorial
- Think Python 2nd
- 一个小小的表白程序(python)
- Python课堂笔记(高淇400集第一季)
- 二级考试python试题12套(包括选择题和
- pywin32_python3.6_64位
- python+ selenium教程
- PycURL(Windows7/Win32)Python2.7安装包 P
- 英文原版-Scientific Computing with Python
- 7.图像风格迁移 基于深度学习 pyt
- 基于Python的学生管理系统
- A Byte of Python(简明Python教程)(第
- Python实例174946
- Python 人脸识别
- Python 人事管理系统
- 基于python-flask的个人博客系统
- 计算机视觉应用开发流程
- python 调用sftp断点续传文件
- python socket游戏
- 基于Python爬虫爬取天气预报信息
- python函数编程和讲解
- Python开发的个人博客
- 基于python的三层神经网络模型搭建
- python实现自动操作windows应用
- python人脸识别(opencv)
- python 绘图(方形、线条、圆形)
- python疫情卡UN管控
- python 连连看小游戏源码
- 基于PyQt5的视频播放器设计
川公网安备 51152502000135号
评论
共有 条评论