pyspider [![Build Status]][Travis CI] [![Coverage Status]][Coverage]
========
A Powerful Spider(Web Crawler) System in Python.
- Write script in Python
- Powerful WebUI with script editor, task monitor, project manager and result viewer
- [MySQL](https://www.mysql.com/), [MongoDB](https://www.mongodb.org/), [Redis](http://redis.io/), [SQLite](https://www.sqlite.org/), [Elasticsearch](https://www.elastic.co/products/elasticsearch); [PostgreSQL](http://www.postgresql.org/) with [SQLAlchemy](http://www.sqlalchemy.org/) as database backend
- [RabbitMQ](http://www.rabbitmq.com/), [Redis](http://redis.io/) and [Kombu](http://kombu.readthedocs.org/) as message queue
- Task priority, retry, periodical, recrawl by age, etc...
- Distributed architecture, Crawl Javascript pages, Python 2.{6,7}, 3.{3,4,5,6} support, etc...
Tutorial: [http://docs.pyspider.org/en/latest/tutorial/](http://docs.pyspider.org/en/latest/tutorial/)
Documentation: [http://docs.pyspider.org/](http://docs.pyspider.org/)
Release notes: [https://github.com/binux/pyspider/releases](https://github.com/binux/pyspider/releases)
Sample Code
-----------
```python
from pyspider.libs.base_handler import *
class Handler(BaseHandler):
crawl_config = {
}
@every(minutes=24 * 60)
def on_start(self):
self.crawl('http://scrapy.org/', callback=self.index_page)
@config(age=10 * 24 * 60 * 60)
def index_page(self, response):
for each in response.doc('a[href^="http"]').items():
self.crawl(each.attr.href, callback=self.detail_page)
def detail_page(self, response):
return {
"url": response.url,
"title": response.doc('title').text(),
}
```
Installation
------------
* `pip install pyspider`
* run command `pyspider`, visit [http://localhost:5000/](http://localhost:5000/)
**WARNING:** WebUI is open to the public by default, it can be used to execute any command which may harm your system. Please use it in an internal network or [enable `need-auth` for webui](http://docs.pyspider.org/en/latest/Command-Line/#-config).
Quickstart: [http://docs.pyspider.org/en/latest/Quickstart/](http://docs.pyspider.org/en/latest/Quickstart/)
Contribute
----------
* Use It
* Open [Issue], send PR
* [User Group]
* [中文问答](http://segmentfault.com/t/pyspider)
TODO
----
### v0.4.0
- [ ] a visual scraping interface like [portia](https://github.com/scrapinghub/portia)
License
-------
Licensed under the Apache License, Version 2.0
[Build Status]: https://img.shields.io/travis/binux/pyspider/master.svg?style=flat
[Travis CI]: https://travis-ci.org/binux/pyspider
[Coverage Status]: https://img.shields.io/coveralls/binux/pyspider.svg?branch=master&style=flat
[Coverage]: https://coveralls.io/r/binux/pyspider
[Try]: https://img.shields.io/badge/try-pyspider-blue.svg?style=flat
[Issue]: https://github.com/binux/pyspider/issues
[User Group]: https://groups.google.com/group/pyspider-users
没有合适的资源?快使用搜索试试~ 我知道了~
Python中一个强大的Spider:Web爬网程序

共191个文件
py:108个
md:24个
js:13个

1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 114 浏览量
2024-03-01
21:47:16
上传
评论
收藏 2.54MB ZIP 举报
温馨提示
Python中一个强大的Spider(Web爬网程序) 在Python中,一个强大的Spider(爬虫)是指一个具有高度灵活性和扩展性的网络爬取程序。它能够根据特定需求自动抓取互联网上的数据并进行处理。 以下是一个强大的Spider的关键概念: 高度可配置: 一个强大的Spider应该具有高度的可配置性,允许开发者根据需要调整爬取规则、抓取频率、爬取深度等参数。这样可以根据不同网站的特点和需求进行定制化配置。 智能化的数据提取: 一个强大的Spider能够智能地从网页中提取所需的数据。它应该支持使用各种选择器(如XPath或CSS选择器)来定位和提取目标数据,并支持处理带有动态加载内容的页面。 处理反爬机制: 现今许多网站都采用了各种反爬虫机制来防止爬取行为。一个强大的Spider应该具备应对和绕过常见反爬机制的能力,例如处理验证码、模拟登录、使用代理IP等手段。 并发与分布式处理: 为了提高效率和避免单机爬取限制,一个强大的Spider应该支持并发和分布式处理能力。它可以使用多线程、协程或分布式任务队列等技术,以提高抓取效率。 ...
资源推荐
资源详情
资源评论






















收起资源包目录





































































































共 191 条
- 1
- 2
资源评论



百锦再@新空间
- 粉丝: 2w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 基因工程的前景与应用.doc
- 基于Sobel算子海面风向反演算法研究.docx
- 公司部门采购管理流程图EXCEL模板.xlsx
- 计算机通信控制系统的相关问题之浅析的论文-通信技术论文.docx
- 能够创造价值的数据才是大数据.docx
- 医院信息化管理咨询服务项目.doc
- C语言报告小型公司工资标准管理系统.doc
- 用spss软件进行一元线性回归分析.ppt
- 对网络在线教育技术的哲学思考.docx
- GBASE-8M-内存数据库错误码手册-odbc.doc
- autocad帮助系统用户手册之绘制组织和保存图形模板.doc
- 电站计算机系统软件平台的优化及改进(1).docx
- 基于.NET-Framework-3.5的企业应用架构技术研究的论文-计算机应用论文.docx
- GIS数据可视化综合PPT.ppt
- 基于MOOC的《物联网工程项目开发》课程探究.docx
- 医院信息化建设方案23367.doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
