Skip to content

Instantly share code, notes, and snippets.

Embed
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-group-item__content');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(window.open()){document.write(output);document.body.appendChild(document.createElement('script')).src='https://bl.ocks.org/insin/raw/1031969/tableToExcel.js';document.close();}})();
@natzir

This comment has been minimized.

Copy link
Owner Author

@natzir 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');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.