21 Star 40 Fork 13

ketle / jiumozhi

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

鸠摩智(多进程版)简介

前几天看到 http://doc.shenjianshou.cn/ 觉得不错,就省下几天守望开车时间照着文档用php实现了一遍,下面是对比shenjianshou的不足,改进和使用上的区别

不足:

  • 没有js渲染
  • 没有验证码识别
  • 暂时没有自动换代理
  • 暂时没有图片本地化/托管云
  • 暂时没有模拟登录
  • 暂时没有录入数据库 (已加)

特点/改进:

  • 多进程,现在只能在liunx下使用了,单进程很容易内存耗尽- -
  • 使用curl multi"多线程",可以自定义"线程"数,速度刷刷刷的
  • 支持css选择器,xpath,正则3种选择器

使用上的区别:

  • 查看SiteConfig目录下 数字.php 具体配置,因为用php搞的,各种传递参数啥的都不一样,但看起来大体一样;
  • 用Xpath取回来的是innerHtml
  • jsonpath没怎么弄
  • contentUrlRegexes helperUrlRegexes 规则里没带域名

如何安装

git clone https://github.com/ketle/jiumozhi.git
cd jiumozhi
composer install

如何开始

配置config.php下db,redis设置
Usage: php index.php <1-n> <test|start|stop|restart>
比如: php index.php 1 test
手动停止请Ctrl+c
SiteConfig目录下自带了5个例子;
第一个例子入库2599条数据 时间从2016-08-22 22:15:13 - 2016-08-22 22:17:48 才用时2分半

为啥叫"鸠摩智"

拍脑袋想出来的,哈哈哈

MIT License Copyright (c) 2016 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

phpcrawler,php爬虫,php采集器,多进程,多线程 展开 收起
PHP
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
PHP
1
https://gitee.com/ketle/jiumozhi.git
git@gitee.com:ketle/jiumozhi.git
ketle
jiumozhi
jiumozhi
multiProcess

搜索帮助