https://github.com/devoxin/tubesearch
YouTube Search module for NodeJS
https://github.com/devoxin/tubesearch
Last synced: 12 months ago
JSON representation
YouTube Search module for NodeJS
- Host: GitHub
- URL: https://github.com/devoxin/tubesearch
- Owner: devoxin
- License: mit
- Created: 2018-06-15T12:08:03.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-05-13T15:47:16.000Z (about 2 years ago)
- Last Synced: 2024-10-31T19:45:03.839Z (over 1 year ago)
- Language: JavaScript
- Size: 15.6 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TubeSearch
YouTube Search module for NodeJS
## Usage
```js
const { search, playlist } = require('tubesearch');
search('chicken soup')
.then((results) => {
// Results will be empty if nothing found, otherwise could look like:
/*
[ { title: 'Skrillex & Habstrakt - Chicken Soup [Official Audio]',
link: 'https://youtube.com/watch?v=22MWrWPV_QM',
id: '22MWrWPV_QM',
uploader: 'OWSLA',
duration: '3:28',
durationMs: 208000,
isLiveStream: false },
{ title: 'How to Cook Basic Chicken Soup Easy',
link: 'https://youtube.com/watch?v=GYPtgtPlpLA',
id: 'GYPtgtPlpLA',
uploader: 'OldManCooking',
duration: '5:45',
durationMs: 345000,
isLiveStream: false },
{ title: 'Stock & Chicken Noodle Soup | Basics with Babish',
link: 'https://youtube.com/watch?v=74tZ-yOOPy0',
id: '74tZ-yOOPy0',
uploader: 'Binging with Babish',
duration: '8:27',
durationMs: 507000,
isLiveStream: false } ]
*/
});
playlist('identifier')
.then((results) => {
// Similar to above, results will be empty if nothing found.
// Otherwise, they could look like:
/*
[ { title: 'END-S - BussItDown',
link: 'https://www.youtube.com/watch?v=BAIZFRoVACI',
id: 'BAIZFRoVACI',
uploader: 'A X S T H X T I C .',
durationMs: 122000 },
{ title: 'VINCCE - Orange CHÄSER',
link: 'https://www.youtube.com/watch?v=KrFCKuNQQoc',
id: 'KrFCKuNQQoc',
uploader: 'A X S T H X T I C .',
durationMs: 131000 },
{ title: 'Jake OHM - Welcome Home',
link: 'https://www.youtube.com/watch?v=3OgNPNm0gxU',
id: '3OgNPNm0gxU',
uploader: 'A X S T H X T I C .',
durationMs: 141000 } ]
*/
})
```