Skip to content

Instantly share code, notes, and snippets.

@CaiJiJi
Created August 8, 2018 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CaiJiJi/da81e1a5fe054b0fc45a59a452c8bc91 to your computer and use it in GitHub Desktop.
Save CaiJiJi/da81e1a5fe054b0fc45a59a452c8bc91 to your computer and use it in GitHub Desktop.
Get google result
var a = document.getElementById('rcnt').innerHTML.match(/<a href=\"(.*?)\" ping/g);
for (var i=0;i<a.length;i++)
{
var method = a[i].match(/"(.*?):\/\//g)[0];
var domain = a[i].split("/")[2];
var result = method+domain
console.log(result.substr(1));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment