Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bdadam/video-url-normalizer
This npm package normalizes the URL of different video hosting services
https://github.com/bdadam/video-url-normalizer
Last synced: 4 months ago
JSON representation
This npm package normalizes the URL of different video hosting services
- Host: GitHub
- URL: https://github.com/bdadam/video-url-normalizer
- Owner: bdadam
- License: mit
- Created: 2015-01-24T20:55:41.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-24T22:08:08.000Z (almost 10 years ago)
- Last Synced: 2024-08-10T13:06:03.708Z (4 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# video-url-normalizer
This npm package normalizes the URL of different video hosting services
This module is intended to be used to normalize the URLs of different video hosting sites.
The normalized URLs are not necessarily the canonical URLs of the videos.
Each valid video URL has an ID which is unique at its specific hoster.Currently supported services:
* Youtube
* Dailymotion
* Vimeo## Usage
```JavaScript
var normalizeVideoUrl = require('video-url-normalizer');
var urlToVideo = 'http://www.youtube.com/watch?v=abcdefghijk&feature=feedrec_grec_index';var obj = normalizeVideoUrl(urlToVideo);
assert(obj.hoster === 'youtube');
assert(obj.id === 'abcdefghijk');
assert(obj.url === 'http://www.youtube.com/watch?v=abcdefghijk');
```