1.0.8 • Published 5 years ago

@bowwow/pornhub_api v1.0.8

Weekly downloads
7
License
MIT
Repository
github
Last release
5 years ago

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

  • search(options) ⇒ object

    it searches the pornhub database based on the options.

Kind: instance method of PornHub

ParamTypeDescription
optionsobjectprivacy gown

Available options

NameTypeDescription
categorystringcategory
pagenumberpage
searchstring search keyword
phraseArray\<string>|stringpornstars
tagsArray\<string> |stringtags
orderingenumfeatured | newest | mostviewed | rating
periodenumweekly | monthly | alltime
thumbsizeenumsmall | medium | large | small_hd | medium_hd | large_hd
  • filterJSON(searchResult) ⇒ object

    it filters out useless properties from the search result.

Kind: instance method of PornHub

ParamTypeDescription
searchResultobjectfrom the function search()
  • hasFLV(videoID) ⇒ boolean

    it returns true if the video with the id has a flv link, return false otherewise.

Kind: instance method of PornHub

ParamTypeDescription
videoIDstringid of the video
  • getFLV(videoID) ⇒ string

    it returns the flv link of the video.

Kind: instance method of PornHub

ParamTypeDescription
videoIDstringid of the video