Skip to content

Releases: twlite/node-xvdl

v2.0.0

26 May 14:56
Compare
Choose a tag to compare

Updates

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

v1.0.3

06 Feb 14:14
Compare
Choose a tag to compare
  • types

v1.0.2

05 Feb 12:48
Compare
Choose a tag to compare
  • Return url with info

v1.0.1

05 Feb 09:35
Compare
Choose a tag to compare
  • JSDOC

v1.0.0

05 Feb 09:31
Compare
Choose a tag to compare

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.