Last active
June 17, 2019 05:51
-
-
Save TummanapallyAnuraag/9f2abdc2b47b5d8f25b60e178a40e5bf to your computer and use it in GitHub Desktop.
GSC Usernames
This file contains hidden or 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
/* | |
Author: Anuraag Tummanapally | |
* URL: | |
https://www.google.com/search?q=site:scholar.google.co.in/citations+(iitb+and+ee)+-%22Research+Scholar%22&safe=active&client=ubuntu&hs=PjE&channel=fs&ei=WB3dXN2zNMvFvQTXwqSADQ&start=10&sa=N&ved=0ahUKEwjdv7SIz5_iAhXLYo8KHVchCdAQ8NMDCI4B&biw=1600&bih=717 | |
[OR] | |
* Search for: | |
site:scholar.google.co.in/citations (iitb and ee) -"Research Scholar" | |
in Google, then copy this code and paste in CONSOLE | |
*/ | |
var length_var=document.getElementsByClassName('LC20lb').length; | |
var names = ["names"]; | |
var unames = ["unames"]; | |
for (i =0; i<length_var; i++){ | |
try{ | |
var url=document.getElementsByClassName('iUh30')[i].innerHTML; | |
if(url.indexOf('scholar') < 0){ | |
throw i+": Error with: "+url; | |
continue; | |
} | |
names[i] = document.getElementsByClassName('LC20lb')[i].innerHTML.split(' - Google ')[0]; | |
unames[i] = document.getElementsByClassName('iUh30')[i].innerHTML.split('?user=')[1].split('&')[0]; | |
} | |
catch(e){ | |
console.log(e); | |
} | |
} | |
/* Print to console */ | |
console.table([names, unames]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks Again