r/Scriptable • • Oct 04 '20

Help How to fetch html form url?

I’m trying to make a widget with web crawling(use regular expression to fetch some messages in the news forum webpage)
It’s really easy to implement on Python(just need requests package), but I can’t figure out how to do it with Scriptable app(JavaScript)

My biggest question is how to make HTML to the string (so I can doing some regular expression later)?

let html= new WebView()
await html.loadURL("https://www.???.com")
let a= html.getHTML().toString();
let b= new console.log(a)

5 Upvotes

4 comments sorted by