Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Edqe14/AzlyricScraper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AzlyricsScraper

Search and Scrape lyric from Azlyrics.com using Node

GitHub license GitHub release Dependencies Open Issues

Quick Start

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
});

Docs

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)

License

This project is using MIT License, © Edqe14. Read Here