Code Monkey home page Code Monkey logo

91pron's Introduction

使用说明

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

ini_set('memory_limit','2048M');	//调整最大占用内存

基本使用

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;	//更改爬取页数

可以在downloader.php中更改视频的默认存放路径:

static $defaultPath = './videos';	//默认储存路径

下载完成后就可以到videos目录下找到视频文件啦

配合vps使用

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

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

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

下载单个视频文件

运行detailPage.php文件,将视频网页的地址传入

php detailPage.php http://91porn.com/view_video.php?viewkey=042a30e56c9cd20b075f

环境要求

  • windows, linux
  • php >= 5.6

91pron's People

Contributors

lxlpokie avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.