Created
March 3, 2017 02:13
-
-
Save hyunchel/73b918c31fb6386ac58cd00c5503db16 to your computer and use it in GitHub Desktop.
Get a list of names on Google search result.
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
// as of 2017.03.01 | |
console.log(window.location.href);// https://www.google.com/#q=soccer+player+names&* | |
var names = Array.prototype.slice.call(document.getElementsByClassName('klitem')).map(function(node) { return node.getAttribute('title'); }); | |
console.log(names); // ["Cristiano Ronaldo (Real Madrid C.F.)", "Lionel Messi (Argentina national under-23 football team)", ...]L |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment