Pornhub API
Installation
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
Import
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));
Usage
-
object
it searches the pornhub database based on the options.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
options | object |
privacy gown |
Available options
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 |
-
object
it filters out useless properties from the search result.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
searchResult | object |
from the function search() |
-
boolean
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 |
-
string
it returns the flv link of the video.
Kind: instance method of PornHub
Param | Type | Description |
---|---|---|
videoID | string |
id of the video |