Last active
June 29, 2024 18:42
-
-
Save abdes-zakari/37439ee54dc0b90649c9f97639996e98 to your computer and use it in GitHub Desktop.
Extract soundcloud urls from a playlist and create a m3u8 playlist
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
// Extract soundcloud url from a playlist | |
//open the soundcloud playlist in the browser and put this in the console of the brwoser | |
const tracks = document.getElementsByClassName("trackItem__trackTitle"); | |
for (let i = 0; i < tracks.length; i++) { | |
console.log(tracks[i].href) | |
} | |
// Extract soundcloud url from a playlist and convert it to m3u8 format | |
const tracks = document.getElementsByClassName("trackItem__trackTitle"); | |
let playlist; | |
for (let i = 0; i < tracks.length; i++) { | |
let item = "#EXTINF:-1, "+tracks[i].innerText+"\n" +tracks[i].href+"\n" | |
playlist+=item | |
//console.log(tracks[i].href) | |
} | |
console.log(playlist) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment