Skip to content

Releases: twlite/node-xvdl

v2.0.0

Choose a tag to compare

@twlite twlite released this 26 May 14:56

Updates

  • fixed XVDL.browse()
  • XVDL.download now returns Stream instead of Promise<Stream>

v1.0.3

Choose a tag to compare

@twlite twlite released this 06 Feb 14:14
  • types

v1.0.2

Choose a tag to compare

@twlite twlite released this 05 Feb 12:48
  • Return url with info

v1.0.1

Choose a tag to compare

@twlite twlite released this 05 Feb 09:35
  • JSDOC

v1.0.0

Choose a tag to compare

@twlite twlite released this 05 Feb 09:31

Node XVDL

Video downloader for xvideos.com written in pure JavaScript.

⚠ NSFW Content, 18+ Only!

Installation

$ npm install xvdl

Examples

Getting info

const { XVDL } = require("xvdl");
const url = "VIDEO_URL_HERE";

XVDL.getInfo(url)
    .then(info => console.log(info))
    .catch(e => console.error(e));

/*
{
    title,
    length,
    views,
    streams,
    thumbnail,
    relatedVideos,
    ratings,
    comments,
    channel
}
*/

Downloading a video

const { XVDL } = require("xvdl");
const fs = require("fs");
const url = "VIDEO_URL_HERE";

XVDL.download(url, { type: "hq" })
    .then(stream => stream.pipe(fs.createWriteStream("./video.mp4")))
    .catch(console.error);

API

getInfo(url)

This method returns basic info of a video.

download(url, options?)

This method downloads a video of the given url.

search(query, page?)

This method can be used to search videos. You can also specify the page to search on.

browse(path?)

This method is used by search function. By default, it returns the videos of homepage.