I need to get the url of the main image of different web sites on a Google Sheet cell.
I´m getting the HTML through a HTTP call, but if I use Get images and then parse them, I get so many bundles with images in different positions, and the image changes position depending on the source of the news.
Is it possible to select only the image based on the Meta Tag
Which meta tag do you want to filter by? You can process each image result bundle and search for the presence of a string but I am not sure this is what you’re asking.
Instead of using Get HTML elements in the Text Parser, use the Match Pattern module in the Text Parser. You can just get the HTML by calling the page with HTTP app/Make a request module, and the full HTML will be returned as a text string in the data object.
This doesn’t seem to be HTML but rather a JSON collection. You can use the Text Parser and create a regular expression to look for the URL of the image with this regular expression. The named group will be called URL.
\"url\"\s*:\s*\"(?<URL>http.+)\"
You can also look for the meta property using this regular expression
Thanks for your suggestion. I tried but could not configure it in a fashion that I could get the main picture only. So I resolved it by adding a Pocket module that can do the trick. Thanks very much for the suggestions, I´ll keep on working on the mach pattern module later.