Created
          January 2, 2017 22:11 
        
      - 
      
- 
        Save PseudoSky/30e27c3c1ad3d0b6f669147f18d02a7d to your computer and use it in GitHub Desktop. 
    A fuzzy search for domain urls using wikireverse
  
        
  
    
      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
    
  
  
    
  | // 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