Via NPM:
$ npm i @bowwow/pornhub_api
Visit http://chromedriver.storage.googleapis.com/index.html and download the chrome driver. Place it on your system PATH
You can do it in two ways:
const PornHub = require('@bowwow/pornhub_api');
const ph = new PornHub();
ph.search({search:'porn'}).then(infos=>console.log(infos));
it searches the pornhub database based on the options.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
options | object |
privacy gown |
Name | Type | Description |
---|---|---|
category | string |
category |
page | number |
page |
search | string |
search keyword |
phrase | Array<string>|string |
pornstars |
tags | Array<string> |string |
tags |
ordering | enum |
featured | newest | mostviewed | rating |
period | enum |
weekly | monthly | alltime |
thumbsize | enum |
small | medium | large | small_hd | medium_hd | large_hd |
it filters out useless properties from the search result.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
searchResult | object |
from the function search() |
it returns true if the video with the id has a flv link, return false otherewise.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
videoID | string |
id of the video |
it returns the flv link of the video.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
videoID | string |
id of the video |