Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
babymm
authored and
babymm@aliyun.com
committed
Sep 21, 2018
1 parent
c27373e
commit 78fed98
Showing
4 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# @Time : 2018/9/21 17:32 | ||
# @Author : ganliang | ||
# @File : conf.py | ||
# @Desc : 将md文档转化为tst文档 | ||
|
||
from recommonmark.parser import CommonMarkParser | ||
|
||
source_parsers = { | ||
'.md': CommonMarkParser, | ||
} | ||
|
||
source_suffix = ['.rst', '.md'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# pcrawler爬虫 | ||
***pcrawler是一款python版本的爬虫程序,通过该爬虫程序可以非常快速方便的编写一个自己的爬虫程序。pcrawler主要 | ||
包含downloader、schedular、processor、storage四大组件组成。而且可以非常方便快捷的拓展各个组件。*** | ||
|
||
## 特性: | ||
- 简单的API,可快速上手 | ||
- 模块化的结构,可轻松扩展 | ||
- 提供多线程和分布式支持 | ||
|
||
## 架构 | ||
pcrawler主要包含downloader、schedular、processor、storage四大组件组成。 | ||
- processor 爬虫页面处理器,对页面进行分析。目前集成图片下载处理器、多媒体视频下载处理器、新浪新闻处理器。 | ||
- schedular URL管理组件,对待抓取的URL队列进行管理,对已抓取的URL进行去重。目前url队列管理支持文件缓存管理和集合管理。url去重支持文件缓存、集合、bloomFilter布隆过滤器等。 | ||
- downloader 下载组件,默认使用urllib2下载。 | ||
- storage 存储组件,支持多样文件格式(csv、json、avro、video) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 布隆过滤器 | ||
|
||
***布隆过滤器是一个快速过滤数据的工具,pcrawler爬虫程序使用布隆过滤器主要是做爬虫去重的策略, | ||
通过布隆过滤器可以大大减少内存消耗,本来项目使用list来去重,但是内存消耗太大,随着爬虫程序的 | ||
运行,会导致机器内存消耗过大,最终导致内存溢出。使用布隆过滤器大大减少了内存消耗*** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
avro | ||
pybloom | ||
lxml | ||
codecov | ||
codecov | ||
recommonmark |