python的死简单网络爬虫
creep的Python项目详细描述
[![PYPI版本](https://img.shields.io/PYPI/V/screegy.svg?style=flat)(https://pypi.python.org/pypi/screegy/)
[![PYPI下载](https://img.shields.io/PYPI/dm/screegy.svg?style=flat)(https://pypi.python.org/pypi/screegy/)
令人毛骨悚然的是,python的另一个web爬虫程序,它可以提供一种简单、轻松的方式来编写web爬虫程序。
python的示例用法
``python
mycrawler类(爬虫程序):
def process\u document(self,doc):
如果doc.status==200:
print'[%d]%s%(doc.status,doc.url)
对doc.text(页面内容)做点什么
其他:
pass
crawler=mycrawler()
crawler.set_follow_模式(crawler.f_同一主机)
crawler.crawler.add_url_过滤器('\.(jpg jpeg gif png js css swf swf)$')
crawler.crawler.crawler('http://www.www.www.exwww.www.www.www.com.example./')
```
安装
1。从pypi安装:
`pip install screegy`
2。Arch Linux用户可以在AUR上找到它,也可以使用[yaourt](https://wiki.arch linux.org/index.php/yaourt):
`yaourt-s python2-screwy git`
分叉
2.创建功能分支(`git checkout-b my new feature`)
3。提交更改(`git commit-am'add some feature`)
4.推到分支(`git push origin my new feature`)
5。创建新的拉取请求
[![PYPI下载](https://img.shields.io/PYPI/dm/screegy.svg?style=flat)(https://pypi.python.org/pypi/screegy/)
令人毛骨悚然的是,python的另一个web爬虫程序,它可以提供一种简单、轻松的方式来编写web爬虫程序。
python的示例用法
``python
mycrawler类(爬虫程序):
def process\u document(self,doc):
如果doc.status==200:
print'[%d]%s%(doc.status,doc.url)
对doc.text(页面内容)做点什么
其他:
pass
crawler=mycrawler()
crawler.set_follow_模式(crawler.f_同一主机)
crawler.crawler.add_url_过滤器('\.(jpg jpeg gif png js css swf swf)$')
crawler.crawler.crawler('http://www.www.www.exwww.www.www.www.com.example./')
```
安装
1。从pypi安装:
`pip install screegy`
2。Arch Linux用户可以在AUR上找到它,也可以使用[yaourt](https://wiki.arch linux.org/index.php/yaourt):
`yaourt-s python2-screwy git`
分叉
2.创建功能分支(`git checkout-b my new feature`)
3。提交更改(`git commit-am'add some feature`)
4.推到分支(`git push origin my new feature`)
5。创建新的拉取请求