THIS LIBRARY IS MOVED TO GIT.GAY
THIS REPOSITORY IS DEPRECATED AND ARCHIVED!
Yandex.Music module for Lucida downloader library.
# npm
npm install lucida-module-yandex
# pnpm
pnpm add lucida-module-yandex
- Account status fetch implementation
- Instant search for
lucida.search()
- Metadata fetcher implementation
- Working
getStream()
implementation - Basic codebase refactoring
- CI/CD via GitHub Actions
- Optional MTS Music API proxy
- Deprecated API as fallback after bad signature error
- Lyrics downloader
- Documentation of modern "download info" API
import Lucida from 'lucida'
import Yandex from 'lucida-module-yandex'
const lucida = new Lucida({
modules: {
yandex: new Yandex({
// the OAuth token (required)
token: 'y0_0000000000000000000000000000000000000000000000000000000',
// custom user agent (optional; can be used to bypass SmartCaptcha)
customUserAgent: 'curl/8.10.1',
// use MTS Music API proxy for API requests (optional; can be used to bypass SmartCaptcha)
useMTSProxy: false,
// force to use the deprecated API to download the audio (optional)
forceDeprecatedAPI: false,
// the deprecated API fallback (optional, enable by default)
deprecatedAPIFallback: true,
// the HTTP proxy URL (optional; can be used to bypass SmartCaptcha)
proxyUrl: 'http://user:pass@localhost:8080'
})
}
})
async function main() {
const { yandex: yandexAccount } = await lucida.checkAccounts()
console.log('Yandex account status:', yandexAccount)
const boomboxSearch = await lucida.search('бумбокс', 10)
console.log('Бумбокс (Artist):', boomboxSearch.yandex.artists.shift().url)
const album = await lucida.getByUrl('https://music.yandex.ru/album/1111940')
console.log('Поэзия (Album) - ПОЛЮСА:', album.metadata.trackCount, 'track(s)')
const track = await lucida.getByUrl(
'https://music.yandex.ru/album/1111940/track/32656060'
)
console.log(
'Поэзия (Track) - ПОЛЮСА:',
track.metadata.durationMs / 1000,
'second(s)'
)
const streamResponse = await track.getStream()
console.log('Track mime type:', streamResponse.mimeType)
console.log('Track size in bytes:', streamResponse.sizeBytes)
const playlist = await lucida.getByUrl(
'https://music.yandex.ru/users/yearbyyear/playlists/1235'
)
console.log(
'International 2010s Pop Music (Playlist):',
playlist.metadata.trackCount,
'track(s)'
)
}
void main()