getURLMetadata
Script
v11
Fork
1
2
3
4
5
6
7
8
9
10
11
import
{
fetch
}
from
"https://esm.town/v/std/fetch"
;
export
let
getURLMetadata
=
async
(
url
)
=>
{
const
response
=
await
fetch
(
url
)
;
const
webpage
=
await
response
.
text
(
)
;
// Maybe this will work when val.town switches to Deno :-)
// const parser = new DOMParser();
const
DOM
=
parseXML
(
webpage
)
;
// const DOM = parser.parseFromString(webpage, "text/html");
return
DOM
;
}
;