Welcome to url-song-utilities 👋
A module to get information about music titles and even be able to download them !
🏓 Installation
npm i url-song-utilities
✨ Utilisation
Available methods :
#Search a music
<module>.searchSong('<song>')
#Find the type of an url
<module>.sourceUrl('<URL>')
#Search for music lyrics
<module>.getLyrics('<song>')
#Download a music with a YouTube url
<module>.download('<URL>')
#Changing the url of a YouTube video
<module>.toPlayableLink('<YouTube URL>')
Examples :
- For the following examples we will define player as follows :
const player = ;
- Search a music
//The bot will try to get information about the musicawait player
- Find the type of an url (we will use a YouTube URL for the example)
//The bot will try to find the source of the provided url (YouTube or Spotify)await player
- Search for music lyrics
//The bot will try to find the lyrics of the musicawait player
- Download a music with a URL
//The bot will need the fs module function to save the fileconst createWriteStream = ;//The bot will search for the musicawait player
- Changing the url of a YouTube video
//The bot will try to transform the musicawait player
- Result of a search (example : TROLLZ - 6ix9ine with Nicki Minaj)
{
title: 'TROLLZ - 6ix9ine with Nicki Minaj (Official Lyric Video)',
id: '-wts5viH28E',
url: 'https://www.youtube.com/watch?v=-wts5viH28E',
channel: {
name: 'Tekashi 6ix9ine',
url: 'https://www.youtube.com/channel/UCF6jRAgCbSanHolKt0Vt6Qw'
},
thumbnail: 'https://i.ytimg.com/vi/-wts5viH28E/hqdefault.jpg?sqp=-oaymwEjCNACELwBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLDDvxmF9oWa7wca5PXqcYcDvJi-_w',
duration: 204,
source: 'YouTube'
}
🎉 Bonus
- Download event
//The bot will need the fs module function to save the fileconst createWriteStream = ;//The bot will search for the musicawait player
- Search and download
//The bot will need the fs module function to save the fileconst createWriteStream = ;//The bot will search for the music (on Spotify for example)await player
- Changing the url of a YouTube video (example : EJS)
Why use the toPlayableLink() function ? This function transforms a YouTube link into a Google Drive link, which can be read in sites such as (HTML, EJS...). Without using this function it will be impossible to play the requested video directly with the YouTube link.
<!-- const player = require('url-song-utilities'); --><!-- var data = await player.searchSong('HUGEL feat. Amber Van Day - Mamma Mia (Official Video)'); --><!-- var stream = await player.toPlayableLink(data.url); --> You are currently listening to : <%= data.title %> Your browser does not support the audio element.
👤 Developers
This project was designed by Zerio & Simon.
🤝 Contributing
Contributions, issues and feature requests are welcome !
Feel free to check issues page.
📝 License
Copyright © 2020 Zerio & Simon.
Give a ⭐️ (on the Github project) if this project helped you !