xvideosx

1.6.4 • Public • Published

xvideos

Build Status Code Climate Test Coverage

A a Node.js xvideos.com API library.

Install

$ npm install xvideosx

Usage

const xvideos = require('xvideosx');

or 

import xvideos from 'xvideosx';


//-- Inside an async function --//

// Retrieve fresh videos
const fresh = await xvideos.videos.fresh({ page: 1 });
console.log(fresh.videos); // { url, path, title, duration, profile: { name, url }, views, }
console.log(fresh.pagination.current); // 1 
console.log(fresh.pagination.pages); // [1, 2, 3, 4, 5...]
console.log(fresh.hasNext()); // true
console.log(fresh.hasPrevious()); // false

const newFresh = await xvideos.videos.newFresh({ page: 1 });
console.log(fresh.videos)
/*{
    title,
    url,
    thumbNail,
    preview,
    path,
    duration,
    channel,
    views,
  };
*/

const nextPage = await fresh.next();
console.log(nextPage.pagination.current); // 2
console.log(nextPage.hasNext()); // true
console.log(nextPage.hasPrevious()); // true

const previousPage = await fresh.previous();
console.log(previousPage.pagination.current); // 1
console.log(previousPage.hasNext()); // true
console.log(previousPage.hasPrevious()); // tfalse

const url = '/video.ucadpthfed9/me_folle_a_la_mama_de_mi_novia_-_valentina_bellucci_jason_pierce'
const detail = await xvideos.videos.details({url}); /**
{
  title,
  duration,
  image,
  videoType,
  videoWidth,
  videoHeigth,
  views,
  files: {
    low,
    high,
    HLS,
    thumb,
    thumb69,
    thumbSlide,
    thumbSlideBig
  },
  videos:{
    title,
        duration,
        channel,
        thumbNail,
        url,
  }//related videos
} **/

API

  • Retrieve dashboard videos

    const dashboardList = await xvideos.videos.dashboard({ page: 1 });
    • Is there a next page?
      console.log(deshboardList.hasNext()); // true or false
    • Is there a previous page?
      console.log(deshboardList.hasPrevious()); // true or false
    • Refresh page videos
      const refreshedVideos = await deshboardList.refresh();
    • Retrieve next deshboard page videos
      const nextVideos = await deshboardList.next();
    • Retrieve previous deshboard page videos
      const previousVideos = await deshboardList.previous();
  • Retrieve fresh videos

    const freshList = await xvideos.videos.fresh({ page: 1 });
    • Is there a next page?
      console.log(freshList.hasNext()); // true or false
    • Is there a previous page?
      console.log(freshList.hasPrevious()); // true or false
    • Refresh page videos
      const refreshedVideos = await freshList.refresh();
    • Retrieve next fresh page videos
      const nextVideos = await freshList.next();
    • Retrieve previous fresh page videos
      const previousVideos = await freshList.previous();
  • Retrieve best videos

    const bestList = await xvideos.videos.best({ year: '2018', month: '02', page: 1 });
    • Is there a next page?
      console.log(bestList.hasNext()); // true or false
    • Is there a previous page?
      console.log(bestList.hasPrevious()); // true or false
    • Refresh page videos
      const refreshedVideos = await bestList.refresh();
    • Retrieve next best page videos
      const nextVideos = await bestList.next();
    • Retrieve previous best page videos
      const previousVideos = await bestList.previous();
  • Retrieve verified videos

    const verifiedList = await xvideos.videos.verified({ page: 1 });
    • Is there a next page?
      console.log(verifiedList.hasNext()); // true or false
    • Is there a previous page?
      console.log(verifiedList.hasPrevious()); // true or false
    • Refresh page videos
      const refreshedVideos = await verifiedList.refresh();
    • Retrieve next verified page videos
      const nextVideos = await verifiedList.next();
    • Retrieve previous verified page videos
      const previousVideos = await verifiedList.previous();
  • Retrieve video details

    const details = await xvideos.videos.details({ url: 'https://www.xvideos.com/video36638661/chaturbate_lulacum69_30-05-2018' });
  • Filter videos

    const videos = await xvideos.videos.details({ k: 'threesome' });
    const videos = await xvideos.videos.details({ k: 'public', page: 5 });
    • Is there a next page?
      console.log(videos.hasNext()); // true or false
    • Is there a previous page?
      console.log(videos.hasPrevious()); // true or false
    • Refresh page videos
      const refreshedVideos = await videos.refresh();
    • Retrieve next verified page videos
      const nextVideos = await videos.next();
    • Retrieve previous verified page videos
      const previousVideos = await videos.previous();

License

Licence © 4CROS2

Package Sidebar

Install

npm i xvideosx

Weekly Downloads

28

Version

1.6.4

License

BSD-3-Clause

Unpacked Size

78.9 kB

Total Files

87

Last publish

Collaborators

  • 4cross