0

How can I use the output "web content"? What does it contain? What is the structure of this data? Is it a text, a list or other data?

What is the action to add here to obtain informations about the "web content"? Where is the documentation about the "web content" data? The documentation at https://www.macosxautomation.com/automator/services/index.html is useless about this question.

enter image description here

Sorry for the French screenshot. Here is a (automated) translation:

The process receives the current element web content in Safari.app.

The input is the whole selection. [ ] Output replaces the selected text

Image Download

Color Black

For example, I have tried to add this action:

enter image description here

But I obtain always an error:

enter image description here

Translation:

Automator was not able to convert the input data into the chosen type.

OK

Display the process

And I cannot know more because the workflow, as a quick action triggered with the contextual menu, then Service, then name of the workflow, don't display this: enter image description here

Translation:

Results Options

0 items Name

Run the process to see the results.

3
  • Note that the action result is web-archive data. Any action followin the Get Contents of Webpages action in a workflow must accept web content as its input data type. (macosxautomation.com/lion/webcontent/index.html)
    – Loris Foe
    Commented Aug 21, 2021 at 8:26
  • @LorisFoe Thanks, but when I try the example "Extract Images from Selection" I obtain nothing. If I check the box "Display this action..." at "Get Folder Content" action, I obtain a "Err516.dd" error when running. I'm under Big Sur. Perhaps security settings problem? At Security System Preferences: for Files and Folders Downloads is checked for Automator. No way found to add Desktop (where is the documentation?). So I change Desktop to Downloads in the action. But nothing. No error, but folder empty and no image in Preview.app. What to do?
    – quark67
    Commented Aug 21, 2021 at 17:20
  • 1
    Oh no. I count at least six different questions here. If no one has an answer in a might need some simplification so we don’t have to figure how to tie together six answers into one…
    – bmike
    Commented Aug 21, 2021 at 19:10

1 Answer 1

2

First : it does not seem that the input type "web content" is accepted by Safari (because it does not appear under Services menu) but if we use "no input" in Safari it then does appear in Services menu.

Simple example:
This example shows how to launch a QuickAction from the Services menu in Safari. Because the QuickAction does not get any data as input we have to fetch the Safari current web page by :

  1. Get current Safari web page
  2. Retrieve content of the web page
  3. And finally download images

Click save, give a name and launch this new QuickAction from Services menu in Safari; it will download all images of the current web page in your computer. automator screenshot

To conclude : for a Safari quick action don't use the web content input type it does not work (imo)

And to answer your question : the type "web content" is the type of data that my 2nd block returns. It can be used by any block that accepts "web content" type as input (my 3rd block is an example of that).

3
  • So the example macosxautomation.com/lion/webcontent/gfx/workflow01.png from the page macosxautomation.com/lion/webcontent/index.html don't work? It display "web content" as input with Safari (and when I try, the service appears in the Service menu). But as explained, it creates error. Must I update my first post with theses element?
    – quark67
    Commented Aug 22, 2021 at 11:31
  • No this screenshot is outdated (I see multiple issues/changes : between "Save Images from Web Content" and "Get Folder Contents" there was a connection (arrow and circle) but today there is no more! It simply means that an error occurs when we try to get folder contents i.e it does not know which folder in your file system to use – because nothing is communicated between these two blocks!)
    – Loris Foe
    Commented Aug 23, 2021 at 9:58
  • So, finally to answer this subquestion, you can open the images of the current Safari web page by writing this in Automator : imgur.com/JkhHdC5 As you can see now between each blocks there is a connection and data is passing between them.
    – Loris Foe
    Commented Aug 23, 2021 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .