Skip to content

Instantly share code, notes, and snippets.

Last active December 19, 2022 11:40
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Export SEMRush Keyword Clusters
javascript:(function(){output="<html><head><title>Semrush Clusters Extractor</title></head><body><button onclick=\"tableToExcel('semrushTable', 'SEMRush Clusters')\">Export SEMRush Clusters</button><table%20id=\"semrushTable\"><tr><th>Keyword</th><th>Volume</th></tr>";var myCluster = document.getElementsByClassName('sm-groups-item-layout');for(var i = 1; i < myCluster.length; i++){var keyword = myCluster[i].innerText.replace(/,/g,'');output=output + "<tr><td>" + keyword.replace(/\s/g,'</td><td>') +"</tr></td>";};output+="</table>";with({document.write(output);document.body.appendChild(document.createElement('script')).src='';document.close();}})();
Copy link

natzir commented Aug 19, 2019

Update 16.08.2019 by @fabio_seo

From class: sm-groups__data
var myCluster = document.getElementsByClassName('sm-groups__data');

To class: sm-group-item__content
var myCluster = document.getElementsByClassName('sm-group-item__content');

Copy link

natzir commented Dec 16, 2022

Update 16.12.22

From class: sm-group-item__content
To class: sm-groups-item-layout

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment