it is also a nice example to expand/edit to suit other uses. disclaimer: ai generated code
copy(JSON.stringify(
[...document.querySelectorAll('div.songs-list-row')].map((row, i) => {
const links = [...row.querySelectorAll('a.click-action[href]')];
return {
rank: i + 1,
links: links.map(a => ({
text: a.innerText.trim(),
url: a.href
}))
};
}),
null,
2
));