vozmimp3
custom scraper API for querying the vozmimp3.com MP3 database
##install
npm install vozmimp3
usage
to search for a mp3 title or an artist use the queryVozmiMp3
method. Provide a data object with key q
and the value of the query string. Optionally you can limit and sort your results.
var vozmimp3 = require('vozmimp3');
var data = {
q: 'cedar m Planet Of Tokyo',
limit: 5,
sort: {
keys: ['duration']
order: ['desc']
}
}
vozmimp3.queryVozmiMp3(data).then(function(result){
console.log(result);
}).catch(function (err){
console.log(err);
}
getPlaylist
lets you create playlists. Provide a list
key with an array of search queries. For best results use very specific title searches. The API will return one result per item. You can specify a strategy
to retrieve the item with the longest duration
var vozmimp3 = require('vozmimp3');
var data = {
list:
['cedar m Planet Of Tokyo',
'Zonderling Sonderling',
'dj matthiasKlan',
'Rude 66 - The 1000 Year Storm'
],
strategy : 'longestDuration'
}
vozmimp3.getPlaylist(data).then(function(result){
console.log(result);
}).catch(function (err){
console.log(err);
}