I am trying to extract metadata from a website. More specifically, the description tag. This is my code so far:
<p><input id="submittedURL" type="text" placeholder="gimme that URL"></p>
<p><button onclick="grabDesc()">Submit</button></p>
<script>
function grabDesc(){
let desiredURL = document.getElementById("submittedURL").value;
}
</script>
Thanks.
Update: Went and ran my current code. No errors yet no results.
-> I would like to know how to extract the content of the description tag from desiredURL.
If JavaScript then only with nodeJs. This is not possible from the browser only. You need a server. Otherwise with PHP, phyton, etc.