• To facilitate the reading, customizing, and maintenance of this macro,
key Actions are colored as follows:
• GREEN -- Key Comments designed to highlight main sections of macro
• MAGENTA -- Actions designed to be customized by user
• YELLOW -- Primary Actions (usually the main purpose of the macro)
• ORANGE -- Actions that permanently destroy Varibles or Clipboards
(1) Keyboard Maestro Ver 7.2.1+
(2) Yosemite (10.10.5)+
(3) Any Scriptable Browser Supported by KM
I'm currently working on implementing this with a site that lazy loads the search results, is there anyway in keyboard maestro to force load all the results beyond implementing a scroll and pause sequence?
If by "lazy loads" you mean the page stops loading until the user scrolls to the bottom of the current page, then no, I don't know of any other method. This is exactly how this site (KM Forum / Discourse forum) works. It's a PITA.
Hi @JMichaelTX I had used this macro a year? or so ago for a bit, and it worked good, thank you.
I've just had reason to revisit and it is not working for me.
I downloaded the updated version and I get no text in the result window... it's blank.
I'm on Catalina 10.15.7 with Safari 14.0 -
Using Google Search engine, 10 lines and URL as options.
When I disable the last action to delete the variables - GS__LinkList is blank
Thank you for your time @JMichaelTX very appreciated. Yes, I was able to get it to work and as before I'm able to put in certain url's that I want to show SERP for and get a dialog displaying the results placement, by going thru 'for each' line, containing the urls I'm looking for.
Thank you @JMichaelTX, where do I find the //*[@class="rc"]/div/a so that I can find it next time it changes and not bother you! - just curious to learn. I looked at the 'page source' code and found nothing.
You won't find that exact Xpath anywhere in the web page. It is something you construct.
The key is identifying some key HTML element, usually a class name, and then constructing the logical path to the target element (the anchor "a" in this case).
The way you read this Xpath is:
Find the First (or next) element that has a class name of "rc"
Hi Chris, I set the GS__XPath variable in the macro to
(Array.from(document.querySelectorAll("div.yuRUbf > a"), x => x.href)).join('\n')
and ran the macro, cancelling it after it sets the GS__LinkList and that variable is blank.
I'd really like to use this macro, used to use it a year ago all the time.