I'm trying to retrieve the track_artist_name and cue_title from a url used by a radio station to show the song being played. I am using an iFrame to detour the "Same-Origin-Policy" by select/copy the text displayed but the console says: Uncaught TypeError: copyText.select is not a function Does anyone has another idea on how can I get the data ? Thank you : )
<html>
<body>
<iframe src="http://np.tritondigital.com/public/nowplaying?mountName=XERC_FM&numberToFetch=1" height="200" width="500" title="Iframe Example" id="frame" allow="clipboard-read; clipboard-write"></iframe>
<button onclick="myFunction()">Copy text</button>
<script>
function myFunction() {
var copyText = document.getElementById("frame");
copyText.select();
copyText.setSelectionRange(0, 99999);
document.execCommand("copy");
alert("Copied the text: " + copyText.value);
}
</script>
</body>
</html> ```