Thanks for the tag, but you really don’t need to tag me in new posts. I read everything that is posted (eventually - I do sleep, work, have a life outside this forum), and if I think I can help or add any additional advice I will always try to do so when I get time. But also keep in mind I do not have all the answers and the best answers come when lots of people add to the conversation sharing ideas, perspectives and solutions.
First of all the refresh of widgets is controlled by the OS. You don’t get to dictate the frequency of the update. but you can affect the refresh rate.
Next, scraping this sort of thing from a website can be done, but is not always reliable. In fact if I use the URL in your script and reach out for the page content it has a message overlaid on the page.
Scraping the page should be a last resort, but using regular expressions to try and match content is a good approach.
A better option would be to connect to an API to get the raw data, but I assume you don’t have access to such an API.
The issue with the widget not being found, well, I would suggest rather than using the AI generated code that you start with a simple widget that is known to work.
There is a gargantuan thread of widgets that could be examples:
But I would ensure something simpler, so perhaps the one from this post?
Or to get more explanation on putting together a widget, this guide.
https://www.reddit.com/r/Scriptable/s/wlkeIffipL
Once you have the widget start by say grabbing the page title and displaying that. After that parse the page and pull in the elements you are searching for.
Just keep in mind the refresh rate is something you can affect but not control, and scraping from a web page rather than getting data via an API will lead to errors as the page formats/layout can change due to website updates, redesigns, and addition of dynamic content like that sjown above.
Hope that helps.