document.getElementById on Scriptable

Sure that this really works?
When I copy/paste this code into Scriptable I get only errors…
Any idea why?

The webpage have changed since then. So naturally that wouldn’t work today because of the changes on the page.

Try this updated version.

let url = "https://scriptable.app"
let wv = new WebView()
await wv.loadURL(url)
let js = `
document
  .querySelector(".appStoreLink")
  .href
`
let link = await wv.evaluateJavaScript(js)
log("Download Scriptable at " + link)

Ah, got it. Thank you :pray: