Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swag666baby/babytube
a pytube-based library for searching and YouTube downloads
https://github.com/swag666baby/babytube
library music-downloader nodejs npm python pytube scraper youtube youtube-api youtube-downloader youtube-scraper
Last synced: about 1 month ago
JSON representation
a pytube-based library for searching and YouTube downloads
- Host: GitHub
- URL: https://github.com/swag666baby/babytube
- Owner: Swag666baby
- Created: 2023-05-17T03:18:40.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-12-19T20:07:21.000Z (11 months ago)
- Last Synced: 2024-09-28T03:41:04.734Z (about 2 months ago)
- Topics: library, music-downloader, nodejs, npm, python, pytube, scraper, youtube, youtube-api, youtube-downloader, youtube-scraper
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/babytube
- Size: 78.1 KB
- Stars: 20
- Watchers: 5
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# babytube
[![NPM Version](https://img.shields.io/npm/v/babytube.svg?maxAge=10)](https://www.npmjs.com/package/babytube)
[![Npm package yearly downloads](https://badgen.net/npm/dt/babytube)](https://npmjs.com/package/babytube)babytube is a pytube based library to get data from a given youtube video, download it or just the audio.
# necessary
you need python3 and (obviously) nodejs installed on your machine.# installation
```
npm install babytube
```# examples
to get data from a video like description, title, duration, thumbnail and stuff like that use the **getData** method.```javascript
const babytube = require("babytube")babytube.getData('https://www.youtube.com/watch?v=VIDEO_ID').then((data) => {
console.log(data);
})
```
#
to download some music use the **musicDownload** method.
```javascript
const babytube = require("babytube")babytube.musicDownload('https://www.youtube.com/watch?v=VIDEO_ID', 'FILENAME.mp3').on('finish', () => {
console.log("completed download.")
})
```
or to download the video
```javascript
const babytube = require("babytube")babytube.videoDownload('https://www.youtube.com/watch?v=VIDEO_ID', 'FILENAME.mp4').on('finish', () => {
console.log("completed download.")
})
```