Skip to content

Instantly share code, notes, and snippets.

@PseudoSky
Created January 2, 2017 22:11
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 PseudoSky/30e27c3c1ad3d0b6f669147f18d02a7d to your computer and use it in GitHub Desktop.
Save PseudoSky/30e27c3c1ad3d0b6f669147f18d02a7d to your computer and use it in GitHub Desktop.
A fuzzy search for domain urls using wikireverse
// GO TO https://wikireverse.org/
function inj(service){
service = service|| "$rootScope";
return angular.element(document.body).injector().get(service);
}
$http=inj('$http');
entries=[]
function getUrls(site, pages, start){
_.range(pages||100).map((page) => $http.get('https://api.wikireverse.org/site_search/'+site+'/sites?page='+((start||0)+page)).success( (r) => {entries=entries.concat(r);}))
}
limit=5
getUrls('wordpress.com',limit, 500)
// Check results
if(entries.length){
// Make sure they're unique
_.keyBy(entries, 'host')
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment