Created
February 11, 2020 15:42
-
-
Save loretoparisi/b6d4d273ef27c5a2f5048f91b53f6be9 to your computer and use it in GitHub Desktop.
Mixing Secrets Audio Tracks Dataset - http://www.cambridge-mt.com/ms/mtk/
This file contains hidden or 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
script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script); | |
function download(name,jsonObject) { | |
var fileContents = JSON.stringify(jsonObject, null, 2); | |
var pp = document.createElement('a'); | |
pp.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(fileContents)); | |
pp.setAttribute('download', name+'.json'); | |
pp.click(); | |
} | |
df=[] | |
$('.m-mtk-track').each((index,item) => { | |
var artist = $(item).parent().parent().parent().find('.m-container__title-bar-item span').text() | |
var title=$( $(item).find('.m-mtk-track__name') ).text() | |
var count=$(item).find('.m-mtk-download__count') | |
var link=$(item).find('.m-mtk-download__links a') | |
for(var i=0;i<link.length;i++) { | |
var c=$(count[i]).text().replace(/[^0-9]+/g, '') | |
df.push({title:title, artist:artist, count:c, size: $(link[i]).text(), link:$(link[i]).attr('href')}) | |
} | |
}) | |
setTimeout(download("mixing_secrets_audio_tracks_dataset",df),500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Dataset