Search and Scrape lyric from Azlyrics.com using Node
const scraper = require("azlyrics-scraper");
// Or use ES6 import
import scraper from "azlyrics-scraper";
/* <> Required
* [] Optional
*/
scraper.search(<Title>).then(result => {
console.log(result);
}).catch(error => {
// Error handling here
});
scraper.getLyric(<Title>).then(result => {
console.log(result.join(""));
}).catch(error => {
// Error handling here
});
scraper.getLyricFromLink(<URL>).then(result => {
console.log(result.join(""));
}).catch(error => {
// Error handling here
});
scraper.hotSongs().then(result => {
console.log(result.join(""));
}).catch(error => {
// Error handling here
});
scraper.randomArtist([First Letter/Number]).then(result => {
console.log(result);
}).catch(error => {
// Error handling here
});
scraper.randomSong().then(result => {
console.log(result);
}).catch(error => {
// Error handling here
});
search(query): Returns an array of search results from Azlyrics. returns Promise(result<Array>, error)
getLyric(query): Returns an array of queried lyrics. returns Promise(result<Array>, error)
getLyricFromLink(uri): Must Azlyrics URI Returns an array of queried lyrics. returns Promise(result<Array>, error)
hotSongs(): Returns an array of current hot songs. returns Promise(result<Array> { title, url }, error)
randomArtist(): Returns a url to a random artist on Azlyrics. returns Promise(result<String>, error)
randomSong(): Returns a object to a random song lyric from Azlyrics. returns Promise(result<Object> { title, url }, error)
This project is using MIT License, © Edqe14. Read Here