Git Product home page Git Product logo

91porn_php's Introduction

使用说明

  • 新增使用代理入口:downloader.php第12行,请自行选择

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

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

如果需要不占用内存的版本,请下载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;	//更改爬取页数

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

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

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

使用代理

downloader.php中修改代理地址:

// static $proxy = 'http://127.0.0.1:1087';
// static $proxy = 'socks5://127.0.0.1:1086';

可支持http代理或socks5代理,稳定性更高

下载单个视频文件

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

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

环境要求

  • windows, linux, macos
  • nodejs
  • php >= 5.6

Node.js 安装方法:

Windows

https://nodejs.org/en/download/

MacOS

brew install node --with-npm

群晖

套件中心

CentOS

yum install nodejs

Ubuntu

apt-get install nodejs

联系方式

91porn_php's People

Contributors

harukama avatar zzjzz9266a 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.