KWGT: get string from URL outputs nothing

Hi there!

I’m trying to get a string from a specific URL, namely the “Looking Ahead” section from Accuweather (e.g., New York, NY Weather Forecast | AccuWeather).

Even before starting to try and exclude the non relevant bits, using

$wg(“New York, NY Weather Forecast | AccuWeather”, txt)$

outputs nothing (not even an error). Any ideas? Should I give up and user Tasker instead to get the string?

Thanks in advance!

Hi there,

Could you please share us the screenshot(s) of the error and the codes you enter? For helping us identify the issue.

Thank you.

Sure, there’s not even an error :slight_smile: Not even if I use the default example from WG - web get | Kustom HQ

Formula Description
$wg(“goo.gl/wNMV3f”, txt)$ Convert HTML content at URL into plain Text

Hmm… I am afraid that AccuWeather implements an anti-scraping system for their web data. And we can only get their weather data by using their paid API access.

The wg() function of Kustom does well, I tried it on some other websites and RSS feeds. I personally use it in most of my interactive wallpaper products.

You can see in the example on my screenshot I’m not even trying to access Accuweather right now (I’m using the default example URL on kustom docs).

Hi there,

The example URLs are not working, it’s just to describe the syntax.

I just tried on Pixabay website and it works.

Tried pixabay and it worked. It’s also https. Wondering what kind of websites work and don’t work (Accuweather doesn’t work regardless).

Thanks

Hi there,

As for AccuWeather, they protect their website from web scraper. The only way to get their data is through API, you can use wg() to access their API URL if you subscribe to their API access.

I just tried another website successfully:

$wg("https://www.amazon.com",txt)$

So, there’s no issue with wg() function, the issue is the target website (the URL)… whether the website allows anyone to scrap their web data or not.

I hope this would help.
:smiling_face::+1: