2021-08-24 11:27:29 +05:30
# Why play-dl ?
2021-08-22 18:49:25 +05:30
2021-08-24 11:27:29 +05:30
[ytdl-core ](https://github.com/fent/node-ytdl-core ) has some issues with miniget and also stream abort issues. On the other hand, [youtube-dl ](https://github.com/ytdl-org/youtube-dl ) is a very perfect alternative but it takes time to launch. Hence, play-dl is created to avoid these issues along with providing comparatively faster performance than others.
2021-08-22 18:49:25 +05:30
2021-08-24 11:27:29 +05:30
### Download videos/playlists or search for videos
2021-08-22 18:49:25 +05:30
2021-08-24 11:27:29 +05:30
This is a **light-weight** youtube downloader and searcher.
- searches by video, playlist, channel
- obtains audio playback url
2021-08-22 18:49:25 +05:30
### Installation
2021-08-24 11:27:29 +05:30
```bash
2021-08-22 18:49:25 +05:30
npm install play-dl@latest
```
2021-09-09 12:11:11 +05:30
### Importing
```ts
import * as play from 'play-dl' // ES-6 import or TS import
const play = require('play-dl') //JS importing
```
2021-09-09 13:32:41 +05:30
**Instructions for Spotify** are [here ](https://github.com/play-dl/play-dl/discussions/64 )
2021-08-24 11:27:29 +05:30
### Examples
2021-09-05 21:21:29 +05:30
- [YouTube ](https://github.com/play-dl/play-dl/tree/main/examples/YouTube )
- [Spotify ](https://github.com/play-dl/play-dl/tree/main/examples/Spotify )
2021-08-24 11:27:29 +05:30
2021-09-05 18:50:57 +05:30
### Docs
2021-08-24 11:27:29 +05:30
2021-09-05 21:21:29 +05:30
- [Main ](https://github.com/play-dl/play-dl/tree/main/docs#play-dl-commands )
- [YouTube ](https://github.com/play-dl/play-dl/tree/main/docs/YouTube#youtube )
- [Spotify ](https://github.com/play-dl/play-dl/tree/main/docs/Spotify#spotify )