How to Get the Text Content of a Rendered Web Page

We can get the current URL with the %FrontBrowserURL% token, but what about the page's content after it's been loaded?

Some of my macros literally use ⌘A with ⌘C to select+copy everything on a page, write it to a file, and then I use a script to go through line by line to check out the text.

Is there a better way to do this? JavaScript maybe?

Keep in mind that I also need to avoid using something like wget because it won't render content and it also won't work reliably for sites behind a login.

What web browser?

Safari for instance has an AppleScript command for getting the text of the front page.

Then again a little JavaScript will often do the trick:

1 Like

Chrome – but I'll use Safari if it works better for some reason.

This is great as it's getting everything I need so far! No more manually selecting everything! ty ty ty!

1 Like