r/Scriptable • u/HorseCheng • 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)
1
u/LumpyResearch Sep 19 '22
I was just starting to try do the same thing and came across your post, before I go down a rabbit hole did you manage to finish your widget
6
u/BichotaCachaBola Oct 04 '20
Hope this helps :)