What I am trying to do, is (on paper) very straight forward, however, my lack of programming knowledge might be keeping me from saving plenty of hours of manual work a week. I'd be super-grateful if you guys could help out with this.
On this alibaba.com page you will see a set of results, these are all (or mostly) suppliers of baseball bats.
All I am trying to do is to automate the right-clicking on the company name of each result on the page (even if if the same company shows twice or the result might not be relevant) and copying that link.
The part I do not manage to figure out on my own is how to identify the company link to right-click. The CENTRAL PART of the company URL seems to be always the same, that should help to identify the URL in the page:
Just to give you some additional background:
These links will be copy/pasted in a Google Sheet, the automation will go through all of the results in the page and also run through all of the pages, there can be sometimes 100+ pages of results.
At the moment I am just looking for the code that will help me identify the company link to right-click, I think I will be able to do set-up all the rest.
Hello @JMichaelTX, thanks a lot for helping out with this. When I try to execute the macro on a search result page on Alibaba.com it seems is not copying the results on the clipboard.
Here a screenshot of what I've set-up in KM, it should be the same as your example, when checking the clipboard seems that nothing is copied there.
Please make sure that both the Macro, and the Macro Group it is in are enabled, and that the MG is activated. Set the MG to "always activated" to make sure.
Thank you @JMichaelTX for your continued support. I appreciate that a lot!
I can confirm the macro group and the macro are activated. I have realised that KM throws this error message (I was on "do not disturb" in the previous tests and would not see the notification ).
I wasn't able to expand/read the full message... not sure if I am being very lame...
I tried also to deactivate any extension in Chrome and compared the code you provided with what I have pasted. No luck.
Now the good news , it did work on Safari!
So the issue should be related to (my?) Chrome (set-up?) somehow. I've checked and JS is active on my Chrome and I am on the newest version. I am now going to work on this through Safari, more than happy with that for sure! Just wanted to mention that as it might help someone else.
Just one last question, can we change the script so that it pulls the company name and URL instead of the title of the page?
See screenshot below. Right now is pulling the information marked in red. I'd like to pull instead the information marked in green.
Just to add, I am presuming I simply need to change the title style name in the code to consistently pull the company info instead of the specific product. But have no idea how to identify the correct name and correct the code accordingly