Last active
December 19, 2022 11:40
-
-
Save natzir/874e326d37b90e3e7964869e8f39c307 to your computer and use it in GitHub Desktop.
Export SEMRush Keyword Clusters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(window.open()){document.write(output);document.body.appendChild(document.createElement('script')).src='https://bl.ocks.org/insin/raw/1031969/tableToExcel.js';document.close();}})(); |
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
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');