I have a script that gets a link from a site that is updated weekly, but it usually gets the cached version that is usually outdated by a week.
Is there a way to clear the cache or force it to load it fresh?
Here it is.
// Fetches page and returns querySelector results
let urlDefault = "https://live.ccbcfamily.org/";
let url = args.urls[0] || urlDefault
let wv = new WebView();
await wv.loadURL(url);
let html = await wv.getHTML()
// let html2 = await wv.waitForLoad()
// let html2 = await wv.loadHTML()
console.log(html)
let selectorScript = "document.querySelector(`a[href*='.pdf'`).getAttribute('href')"
//
let js = args.plainTexts[0] || selectorScript
let runjs = await wv.evaluateJavaScript(js);
console.log(runjs)
Script.setShortcutOutput(runjs)
// return runjs
// await wv.present();
// Script.complete();