I've been using KM for a week now and I'm very satisfied with it; I will almost certainly buy a license when the trial period expires. Until now I managed to find solutions to all the problems I encountered by just searching the forums, but this method wasn't helpful with the the issue I'm currently struggling with.
To get to the point, I'm trying to create a macro that extracts names, dates and other miscellaneous information from any blog post from a particular website. For this, I trigger the action 'Execute a JavaScript in Front Browser' multiple times, each with the code
var divElem = document.querySelector('[JS path of the content to be extracted')
divElem.innerText
Unfortunately, the site in question uses different paths for each blog post, so that e.g. a path that successfully extracts the date from one post fails to extract it from all others. To take a concrete example, the JS path for the date in this post is
#node-1995 > header > div > span.published
but for this other post the path is instead
#node-1997 > header > div > span.published
So my question is whether there's a generic way of specifying a JS path that would capture the same type of content across all pages from this site. Apologies if the answer to this question is obvious, and thanks in advance for any help.