I attempted to extract images from the item link using the formula: $wg(wg(gv(source), rss, 0, link), url, ".jpg",0)$
Unfortunately, it didn’t work.
Now, I’m trying to obtain images directly from the source by extracting the jpg link from the HTML head’s <meta property="og:image">. However, I’m stuck and unsure how to proceed. I need assistance, please.
If you know of a better method to retrieve the image or have suggestions, please share.
Right now you can not extract meta properties using wg unless you use wg XML rather than wg URL, since “URL” is not parsing meta as of now, i need to add a new mode “meta” that will extract the proper meta resource from the head, i will try to add this in 3.75 since its not too difficult
The problem is not Kustom not following redirects but google news is trying to use javascript to redirect when Kustom tries to fetch data using default user agent, a fix could be to force a different user agent (like curl) globally but this would break things, so to fix this please use a Flow instead, so:
Add a WebGet action, add an header with this inside User-Agent: curl/7.1.2
And it works although on preview it doesn’t always do (i am investigating this), it currently sets the title of the article but you can change the property, what i do is:
First fetch with webget the RSS
Then i fetch the article with another webget action using $wg(#last, rss, 0, link)$ (and here and only here the user agent is important)
Finally i parse the metadata using $wg(#last, jsoup, "meta[property=og:title]", content)$ to get the title
You can just copy the below snippet then go to the “flows” tab and press paste icon