资源简介
使用Python编写的爬取百度百科词条信息的Demo源代码,具体看博客:http://blog.csdn.net/tianmaxingkong_/article/details/52959784
代码片段和文件信息
# coding=utf-8
import urllib2
class HtmlDownloader(object):
def download(self url):
if url is None:
return
response = urllib2.urlopen(url)
if response.getcode() != 200:
return None
return response.read().decode(‘utf-8‘)
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-10-28 10:27 test_spider\
文件 2297 2016-10-28 10:20 test_spider\spider_main.py
文件 822 2016-10-28 10:27 test_spider\html_outputer.py
文件 1831 2016-10-28 10:14 test_spider\html_parser.pyc
文件 783 2016-10-28 10:14 test_spider\html_downloader.pyc
文件 1618 2016-10-28 10:14 test_spider\url_manager.pyc
文件 29684 2016-10-28 10:27 test_spider\output.html
文件 1598 2016-10-28 10:27 test_spider\html_outputer.pyc
文件 285 2016-10-28 09:42 test_spider\html_downloader.py
文件 656 2016-10-28 09:39 test_spider\url_manager.py
文件 1685 2016-10-28 10:06 test_spider\html_parser.py
文件 0 2016-10-28 08:19 test_spider\__init__.py
- 上一篇:tcpudp;端口扫描器
- 下一篇:携程机票python爬取脚本优化版本
相关资源
- python一个打砖块的小游戏
- python实验指导书 图文高清版
- python主动安装第三方库
- python爬取豆瓣top250电影信息
- python绘制 大蟒蛇
- python小程序(数组排序)
- Python去水印(基于cv2)
- Python 数据结构入门 - 二叉搜索树(
- python空心电感计算器
- python除法.docx
- 抽奖背后的秘密(python抽奖逻辑)
- 绘制统计学直方图茎叶图(matplotlib)
- python求解标准差
- python数据分析与处理
- 利用Python将照片在Excel中利用点阵图显
- python turtle 跳房子
- python 人群计数
- Python调用第三方API换脸
- “去哪儿吃”帮你选餐厅(python代码
- python 控制台登陆密码验证
- KNN算法的Python实现(datingrecd.ipynb)
- python核心编程第二版-习题答案
- python爬取笔趣阁小说
- Python程序设计基础试题以及答案(3
- python聊天-服务端与客户端
- python递归求最大公约数
- 用python画皮卡丘(基于turtle)
- 伟哥的python私房菜(中国程序员).
- pip一键升级(python脚本)
- 我的世界python编程——天空行走py格式
评论
共有 条评论