523

GitHub - zzjzz9266a/91porn_php: 91爬虫php版本

 5 years ago
source link: https://github.com/zzjzz9266a/91porn_php
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md

logo.jpg

68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d616c6c2d6c69676874677265792e737667 68747470733a2f2f696d672e736869656c64732e696f2f61706d2f6c2f76696d2d6d6f64652e737667 68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c616e67756167652d7068703e3d253230352e362d6f72616e67652e737667

使用说明

当前版本的下载机制是先下到内存里,再存到磁盘上,以防止下载中断导致文件不完整。所以请调整php.ini中内存的限制,最好在256mb以上,否则有可能出现内存溢出。

如果需要不占用内存的版本,请下载v1.0.0

基本使用

91porn.php是爬取首页的视频,直接运行即可

91all.php是爬取列表页的,例如“收藏最多”、“本月最热”等等,要别的列表的话可以去找对应的url

listPage("http://91porn.com/v.php?category=top&viewtype=basic");	//本月最热
listPage("http://91porn.com/v.php?category=mf&viewtype=basic");		//收藏最多
listPage("http://91porn.com/v.php?category=md&viewtype=basic");		//本月讨论

爬取页数可以自行更改,默认到10页;

$maxPage = 10;	//更改爬取页数

下载完成后就可以到videos目录下high啦,嘿嘿嘿~~~

配合vps使用

有的地区91porn容易被墙,所以可以用境外的vps先下载(下载方式同上,而且境外vps下载速度极快),然后再从vps下载到本地;

1、服务端由index.php提供接口,只需要把vps上的http server的监听端口指到该目录下;
2、本地运行client_downloader.php即可下载,需要注意,此文件下的下载URL需要改成对应vps的地址。

$baseURL = 'http://xxoo.com';	//改成对应vps的域名或ip

环境要求

  • windows, linux
  • php >= 5.6

参与开源

欢迎提交 issue 和 PR,大门永远向所有人敞开。

开源协议

本项目遵循 MIT 协议开源,具体请查看根目录下的 LICENSE 文件。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK