1.0.2 • Published 6 years ago

xvideos-valid v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

Xvideos-valid

This is a module i created to verify if a xvideos url is a valid one, and to extract their id. I hope you can find some use for it ^^.

Usage

const xvideos = require('xvideos-valid');

Functions()

isValid(link)

This function checks if the url you parse is a valid xvideos url format.

xvideos.isValid('https://www.google.com'); //returns false
xvideos.isValid('https://www.xvideos.com/video_id/video_name'); //returns true

extractId(link)

This function extract the ID of a valid xvideos url you parse, you can use it to extract the id and generate an embed code by example.

xvideos.extractId('https://www.xvideos.com/video43823948/video_name');
//returns 43823948

xvideos.extractId('https://www.other-url.com/video43823948/video_name');

//returns false

##LICENSE

MIT

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago