Skip to content

Instantly share code, notes, and snippets.

@satyr
Created March 8, 2009 00:47
Show Gist options
  • Select an option

  • Save satyr/75519 to your computer and use it in GitHub Desktop.

Select an option

Save satyr/75519 to your computer and use it in GitHub Desktop.
function cmd_scrapeGooglesMetas(){
var domains = (<>dk se co.nz ca cn com.pr fi co.in co.uk lv co.hu lk com.au
ru nl be de ro kz by no pl pt com.br vc co.za tm com.my bg
co.jp ie com.mx com.om fr mu com.ph com.jm</>).match(/\S+/g),
tab = Application.activeWindow.open(Utils.url('data:text/html,'));
tab.events.addListener('load', function(){
var {document} = tab;
domains.forEach(function(dm){
Utils.parseRemoteDocument('http://google.'+ dm, null, function(doc){
var params = (jQuery('input[name="meta"][id!="all"]', doc)
.map(function()
this.nextSibling.textContent +':'+
this.value).get());
jQuery(tab.document.body).append('<div>'+ params.join(',') + '</div>');
})})});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment