已掉线,重新登录

首页 > 绿虎论坛 > 历史版块 > 编程 > PHP > 源码

标题: 分享采集的笑话数据(3w条)

作者: @Ta

时间: 2018-06-17

点击: 3964

下午写了这个采集,采集了3W条数据用作随机显示一条笑话!
所以把采集的数据(MYSQL导出数据)分享下吧。还有源码(PHP源码)一起分享。


压缩包里pre_funs.sql 就是采集的笑话,总共3W条,导出来了!
压缩包源码写了采集 捧腹网、糗事百科、爆笑一刻、笑话集的例子。有需要的可以看下!



使用的开源库
jaeger/querylist
QueryList是一个基于phpQuery的PHP通用列表采集类,得益于phpQuery
具体文档:https://doc.querylist.cc/site/index/doc/1

guzzlehttp/guzzle
Guzzle是一个PHP的HTTP客户端,用来轻而易举地发送请求,并集成到我们的WEB服务上。
具体文档:http://guzzle-cn.readthedocs.io/zh_CN/latest/

illuminate/database
Laravel 的Eloquent ORM 非常好用
具体文档 参考laravel 里面的ORM教程

joke.zip(3.34 MB)

[隐藏样式|查看源码]


『回复列表(5|隐藏机器人聊天)』

1.

大佬早姬长信api

(/@Ta/2018-06-17 18:38//)

2. 我选择Python
(/@Ta/2018-06-17 18:49//)

3. 大佬,原来你用的是querylist
(/@Ta/2018-06-17 19:44//)

5. 干嘛还要采集,直接使用糗事百科的接口不是更好吗?
http://wx.cezhifu.cn/ha
支持视频播放,图片,神回复
(/@Ta/2018-06-21 09:40//)

6.

@农夫山泉有点甜,论不设置时区

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /www/users/HA104674/WEB/fun/index.php on line 58
(/@Ta/2018-06-21 12:21//)

回复需要登录

7月16日 01:17 星期三

本站由hu60wap6驱动

备案号: 京ICP备18041936号-1