Skip to content

Commit

Permalink
添加readthedocs文档
Browse files Browse the repository at this point in the history
  • Loading branch information
babymm authored and babymm@aliyun.com committed Sep 21, 2018
1 parent c27373e commit 78fed98
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
14 changes: 14 additions & 0 deletions conf.py
@@ -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']
15 changes: 15 additions & 0 deletions docs/README.md
@@ -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)
5 changes: 5 additions & 0 deletions docs/布隆过滤器.md
@@ -0,0 +1,5 @@
# 布隆过滤器

***布隆过滤器是一个快速过滤数据的工具,pcrawler爬虫程序使用布隆过滤器主要是做爬虫去重的策略,
通过布隆过滤器可以大大减少内存消耗,本来项目使用list来去重,但是内存消耗太大,随着爬虫程序的
运行,会导致机器内存消耗过大,最终导致内存溢出。使用布隆过滤器大大减少了内存消耗***
3 changes: 2 additions & 1 deletion requirements.txt
@@ -1,4 +1,5 @@
avro
pybloom
lxml
codecov
codecov
recommonmark

0 comments on commit 78fed98

Please sign in to comment.