Created
December 10, 2019 23:16
-
-
Save alana314/d4956ed999e081af5179198e17fd582b to your computer and use it in GitHub Desktop.
Copy Soundcloud Playlist to JSON
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
//Copies the Artist, Track and URL of a playlist to the clipboard in JSON format | |
//Run in console on a soundcloud page with a playlist: | |
copy([...document.querySelectorAll('.trackItem__content')].map(ele => {return ({'artist' : ele.querySelectorAll('a')[0].innerHTML, 'track' : ele.querySelectorAll('a')[1].innerHTML, 'url' : ele.querySelectorAll('a')[1].href})})) | |
//or log it: | |
[...document.querySelectorAll('.trackItem__content')].map(ele => {return ({'artist' : ele.querySelectorAll('a')[0].innerHTML, 'track' : ele.querySelectorAll('a')[1].innerHTML, 'url' : ele.querySelectorAll('a')[1].href})}) | |
//Example output of my 2019 playlist: | |
/* | |
[ | |
{ | |
"artist": "JUST A GENT", | |
"track": "Drowning (with Yvng Jalapeño)", | |
"url": "https://soundcloud.com/just-a-gent/drowning-with-yvng-jalapeno-1" | |
}, | |
{ | |
"artist": "Hex Cougar", | |
"track": "KRANE - Chemical feat. Ahsha & Lemay (Hex Cougar Remix)", | |
"url": "https://soundcloud.com/hexcougar/kraneremix" | |
}, | |
{ | |
"artist": "EKALI", | |
"track": "Ekali & SLUMBERJACK - Helios", | |
"url": "https://soundcloud.com/ekalimusic/ekali-slumberjack-helios" | |
}, | |
{ | |
"artist": "ᴢᴀᴛʜʟᴜᴛᴇ", | |
"track": "Zathlute - Finding Family", | |
"url": "https://soundcloud.com/zathlute/zathlute-findingfamily" | |
}, | |
{ | |
"artist": "jackal", | |
"track": "Don't Come Near Me I Am A Monster", | |
"url": "https://soundcloud.com/jackalproducer/dont-come-near-me-i-am-a-monster" | |
}, | |
{ | |
"artist": "ROSSY", | |
"track": "f u c k", | |
"url": "https://soundcloud.com/rossykate/fuck" | |
}, | |
{ | |
"artist": "YVNG JALAPEÑO", | |
"track": "Odesza - Memories That You Call (YVNG JALAPEÑO Edit)", | |
"url": "https://soundcloud.com/yvngjalapeno/odesza-memories-that-you-call-yvng-jalapeno-edit" | |
}, | |
{ | |
"artist": "smle", | |
"track": "Bad Idea (ft. Tzar)", | |
"url": "https://soundcloud.com/smlemusic/bad-idea" | |
}, | |
{ | |
"artist": "posij", | |
"track": "Chasing", | |
"url": "https://soundcloud.com/posij/chasing" | |
}, | |
{ | |
"artist": "10K", | |
"track": "10K - Reflections", | |
"url": "https://soundcloud.com/10ksound/10k-reflections" | |
}, | |
{ | |
"artist": "Hex Cougar", | |
"track": "RL Grime - Shrine (feat. Freya Ridings) [Hex Cougar Remix]", | |
"url": "https://soundcloud.com/hexcougar/rl-grime-shrine-hex-cougar-remix" | |
}, | |
{ | |
"artist": "Quality Goods Records", | |
"track": "QGRS-015 | Ian Munro - Fever Dream", | |
"url": "https://soundcloud.com/qualitygoodsrecs/qgrs-015-ian-munro-fever-dream" | |
}, | |
{ | |
"artist": "OWSLA", | |
"track": "josh pan x AWAY - Mask", | |
"url": "https://soundcloud.com/owslaofficial/josh-pan-mask-with-away" | |
}, | |
{ | |
"artist": "Kaivon", | |
"track": "Kaivon - Hear Your Heart", | |
"url": "https://soundcloud.com/kaivonmusic/hearyourheart" | |
}, | |
{ | |
"artist": "VAANCE", | |
"track": "Party Favor & Baauer - MDR (VAANCE Remix)", | |
"url": "https://soundcloud.com/vaance/party-favor-baauer-mdr-vaance-remix" | |
}, | |
{ | |
"artist": "jackal", | |
"track": "Empathy", | |
"url": "https://soundcloud.com/jackalproducer/jackal-empathy" | |
}, | |
{ | |
"artist": "WHIPPED CREAM", | |
"track": "Bad For Me", | |
"url": "https://soundcloud.com/whippedcream/bad-for-me" | |
}, | |
{ | |
"artist": "Cozway", | |
"track": "RL Grime - Shrine Ft. Freya Ridings (Cozway Remix)", | |
"url": "https://soundcloud.com/cozwaymusic/rl-grime-shrine-ft-freya-ridings-cozway-remix" | |
}, | |
{ | |
"artist": "HARD hardfest.com", | |
"track": "KRANE & Hanz - Momentum", | |
"url": "https://soundcloud.com/hardfest/krane-hanz-momentum" | |
}, | |
{ | |
"artist": "JUST A GENT", | |
"track": "VIBE (feat. T$oko)", | |
"url": "https://soundcloud.com/just-a-gent/vibes" | |
}, | |
{ | |
"artist": "EKALI", | |
"track": "Crystal Eyes", | |
"url": "https://soundcloud.com/ekalimusic/crystal-eyes" | |
}, | |
{ | |
"artist": "Hex Cougar's Hextras 2", | |
"track": "Virtual Self - Ghost Voices (Hex Cougar Flip)", | |
"url": "https://soundcloud.com/hex-cougar-hextras-2/virtual-self-ghost-voices-hex-cougar-flip" | |
}, | |
{ | |
"artist": "INVISIBLE", | |
"track": "Rizzle - Murderous (OUT NOW)", | |
"url": "https://soundcloud.com/invisiblerecordings/rizzle-murderous" | |
}, | |
{ | |
"artist": "jackal", | |
"track": "In Love With Nobody", | |
"url": "https://soundcloud.com/jackalproducer/inlovewithnobody" | |
}, | |
{ | |
"artist": "1788-L", | |
"track": "The Glitch Mob - Disintegrate Slowly ( 1 7 8 8 - L / R E M I X )", | |
"url": "https://soundcloud.com/1788-l/the-glitch-mob-disintegrate-slowly-1-7-8-8-l-r-e-m-i-x" | |
}, | |
{ | |
"artist": "QUIX", | |
"track": "Ride Or Die (feat. Reigan)", | |
"url": "https://soundcloud.com/quixofficial/ride-or-die-feat-reigan" | |
}, | |
{ | |
"artist": "ROSSY", | |
"track": "s o r r y", | |
"url": "https://soundcloud.com/rossykate/sorry" | |
}, | |
{ | |
"artist": "Vincent", | |
"track": "RL Grime ~ I Wanna Know (Vincent Remix)", | |
"url": "https://soundcloud.com/vincent_official/iwkremix" | |
}, | |
{ | |
"artist": "GRINN", | |
"track": "Oliverse - Get High (GRINN Remix) [FREE DOWNLOAD]", | |
"url": "https://soundcloud.com/lordgrinn/oliverse-get-high-grin-remix-1" | |
}, | |
{ | |
"artist": "Search North", | |
"track": "Lucian - Sober Heart feat. Olivera (srchnrth remix)", | |
"url": "https://soundcloud.com/searchnorth/lucian-sober-heart-feat-olivera-srchnrth-remix" | |
}, | |
{ | |
"artist": "ᴢᴀᴛʜʟᴜᴛᴇ", | |
"track": "Zathlute - No Tellin", | |
"url": "https://soundcloud.com/zathlute/no-tellin" | |
}, | |
{ | |
"artist": "blanke", | |
"track": "Carmada - Ready For It Feat. Tribes (Blanke Remix)", | |
"url": "https://soundcloud.com/blankemusicau/carmada-ready-for-it-feat-tribes-blanke-remix" | |
}, | |
{ | |
"artist": "GANZ", | |
"track": "Keys N Krates - Flute Loop (ft. Ouici) [GANZ Remix]", | |
"url": "https://soundcloud.com/iamganz/keys-n-krates-flute-loop-ft-ouici-ganz-remix" | |
}, | |
{ | |
"artist": "rudebrat", | |
"track": "BONNIE X CLYDE - The Unknown (Darkk Matter Remix)", | |
"url": "https://soundcloud.com/rudebrat/bonnie-x-clyde-the-unknown-darkk-matter-remix" | |
}, | |
{ | |
"artist": "Hex Cougar's Hextras 2", | |
"track": "Hexifornia (Halloween Edit)", | |
"url": "https://soundcloud.com/hex-cougar-hextras-2/hexifornia-halloween-edit" | |
}, | |
{ | |
"artist": "Quality Goods Records", | |
"track": "Kyral x Banko - Break [Bassrush Premiere]", | |
"url": "https://soundcloud.com/qualitygoodsrecs/kyral-x-banko-break" | |
}, | |
{ | |
"artist": "LICK", | |
"track": "GG MAGREE - BODIES (LICK REMIX)", | |
"url": "https://soundcloud.com/iamlick/gg-magree-bodies-lick-remix-8" | |
}, | |
{ | |
"artist": "Just A Tune", | |
"track": "Blissful (with $aturn & Sarah Shields)", | |
"url": "https://soundcloud.com/justatune/blissful-with-aturn-sarah-shields" | |
}, | |
{ | |
"artist": "DILLONFRANCIS", | |
"track": "White Boi (feat. Lao Ra) [Nitti Gritti Remix]", | |
"url": "https://soundcloud.com/dillonfrancis/white-boi-nitti-gritti-remix-16-bit-master" | |
}, | |
{ | |
"artist": "Subfer", | |
"track": "Flume - Never Be Like You (Subfer Remix)", | |
"url": "https://soundcloud.com/subfer/flumeremix" | |
}, | |
{ | |
"artist": "DEATHPACT", | |
"track": "ODESZA - LOYAL (DEATHPACT REPRISE)", | |
"url": "https://soundcloud.com/deathpact/odesza-loyal-deathpact-reprise" | |
}, | |
{ | |
"artist": "INZO", | |
"track": "INZO - Local Void", | |
"url": "https://soundcloud.com/inzo_music/inzo-local-void" | |
}, | |
{ | |
"artist": "rudebrat", | |
"track": "Alison Wonderland - Good Enōugh [Darkk Matter Bootleg]", | |
"url": "https://soundcloud.com/rudebrat/alison-wonderland-good-enough-darkk-matter-bootleg" | |
}, | |
{ | |
"artist": "insomniacrecs", | |
"track": "YDG - Love Thang (feat. Ookay)", | |
"url": "https://soundcloud.com/insomniacrecords/ydg-love-thang-feat-ookay" | |
}, | |
{ | |
"artist": "EKALI", | |
"track": "Ekali & mossy. - Stay Hollow", | |
"url": "https://soundcloud.com/ekalimusic/ekali-mossy-stay-hollow" | |
}, | |
{ | |
"artist": "MESA", | |
"track": "KRANE & MYRNE - Monarch (MESA Remix)", | |
"url": "https://soundcloud.com/mesamusic11/krane-myrne-monarch-mesa-remix" | |
}, | |
{ | |
"artist": "Shadient", | |
"track": "Wavedash & Tucker Kreway Ft Amelia - Honey Jar (Shadient Remix)", | |
"url": "https://soundcloud.com/shadient/honeyjar-rmx" | |
}, | |
{ | |
"artist": "ᴢᴀᴛʜʟᴜᴛᴇ", | |
"track": "Zathlute - Right Here (feat. Akacia)", | |
"url": "https://soundcloud.com/zathlute/zathlute-right-here-feat-akacia" | |
}, | |
{ | |
"artist": "sari", | |
"track": "Akira / Chemical", | |
"url": "https://soundcloud.com/falafelman/akira-chemical" | |
} | |
] | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment