Skip to content

Instantly share code, notes, and snippets.

@rodhfr
Created January 7, 2026 09:24
Show Gist options
  • Select an option

  • Save rodhfr/44f5c69adb7d5e6c05659fedf95c37fb to your computer and use it in GitHub Desktop.

Select an option

Save rodhfr/44f5c69adb7d5e6c05659fedf95c37fb to your computer and use it in GitHub Desktop.
const links = Array.from(document.querySelectorAll('a[href$=".mp3"]'))
.map(a => a.href)
.join('\n');
const blob = new Blob([links], { type: 'text/plain' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = 'mp3-links.txt';
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment