Created
November 30, 2020 17:05
-
-
Save NormanEdance/dce52ae619f2e30785ed6b93a07784fa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function generateSongList(songSelector){ | |
var res = []; | |
var elements = document.querySelectorAll(songSelector); | |
elements.forEach( (el) => { | |
res.push(el.getElementsByClassName('audio_row__performers')[0].textContent.trim() | |
+ " - " | |
+ el.getElementsByClassName('audio_row__title')[0].textContent.trim()); | |
}); | |
return res; | |
} | |
var claimed = generateSongList('div.audio_row.audio_claimed'); | |
console.group(`Claimed songs (${claimed.length}):`) | |
console.log(claimed.join('\n')); | |
console.groupEnd(); | |
var notClaimed = generateSongList('div.audio_row:not(.audio_claimed)'); | |
console.group(`Not claimed songs (${notClaimed.length}):`) | |
console.log(notClaimed.join('\n')); | |
console.groupEnd(); | |
var all = generateSongList('div.audio_row'); | |
console.group(`All songs (${all.length}):`) | |
console.log(all.join('\n')); | |
console.groupEnd(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To transfer from VK to another music services (Apple Music, Spotify, Yandex, etc.):