Created
December 27, 2024 11:33
-
-
Save afkarxyz/e1aea324e15c5194e0adb66e5603eb73 to your computer and use it in GitHub Desktop.
Open the Developer Tools (F12), navigate to the Console tab, and paste the script.
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
(function() { | |
console.log("Artlist.io Audio Link Catcher started"); | |
const audioLinks = new Set(); | |
function processResponse(responseText) { | |
try { | |
const data = JSON.parse(responseText); | |
const items = data.data.songList?.songs || data.data.sfxList?.songs || data.data.songs || data.data.sfxs || []; | |
items.forEach(item => { | |
if (item.sitePlayableFilePath) { | |
audioLinks.add(item.sitePlayableFilePath); | |
console.log("Found audio link:", item.sitePlayableFilePath); | |
} | |
}); | |
} catch (e) { | |
console.error("Error processing response:", e); | |
} | |
} | |
const originalXHROpen = XMLHttpRequest.prototype.open; | |
XMLHttpRequest.prototype.open = function() { | |
this.addEventListener('load', function() { | |
if (this.responseURL.includes('artlist.io') && this.responseURL.includes('graphql')) { | |
processResponse(this.responseText); | |
} | |
}); | |
originalXHROpen.apply(this, arguments); | |
}; | |
const originalFetch = window.fetch; | |
window.fetch = function() { | |
return originalFetch.apply(this, arguments).then(response => { | |
if (response.url.includes('artlist.io') && response.url.includes('graphql')) { | |
response.clone().text().then(processResponse); | |
} | |
return response; | |
}); | |
}; | |
window.showAudioLinks = function() { | |
console.log("Found audio links:"); | |
audioLinks.forEach(link => console.log(link)); | |
}; | |
console.log("Audio link catcher is active. Use showAudioLinks() to display all found links."); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment