search_apis/search_apis.py
def search_related(self, url, k):
        """
        Return list of related urls using Google related search
        """
        query = "related:" + url
        urls = []
        if self.related_cache.contains(query):
            urls = self.related_cache.get(query)
            print "hit related query: ", query
        else:
            time.sleep(self.google_delay)
            urls = self.google.search(query, k)
            self.related_cache.add(query, urls)

        """
        urls = []
        if 'items' in results:
            for item in results['items']:
                urls.append(url_normalize(item['link']))
        """
 
        print "Related Search - Query: ", url, " - Number of results: ", len(urls)
        return urls

        Return list of related urls using Google related search
        
Return list of related urls using Google related search
Return list of related urls using Google related search
def search_related(self, url, k):
        query = "related:" + url
        urls = []
        if self.related_cache.contains(query):
            urls = self.related_cache.get(query)
            print "hit related query: ", query
        else:
            time.sleep(self.google_delay)
            urls = self.google.search(query, k)
            self.related_cache.add(query, urls)
        print "Related Search - Query: ", url, " - Number of results: ", len(urls)
        return urls
def search_related ( self , url , k ) : query = "related:" + url urls = [ ] if self . related_cache . contains ( query ) : urls = self . related_cache . get ( query ) print "hit related query: " , query else : time . sleep ( self . google_delay ) urls = self . google . search ( query , k ) self . related_cache . add ( query , urls ) """
        urls = []
        if 'items' in results:
            for item in results['items']:
                urls.append(url_normalize(item['link']))
        """ print "Related Search - Query: " , url , " - Number of results: " , len ( urls ) return urls
Return list of related urls using Google related search
Return list of related urls using Google related search
"""
        Return list of related urls using Google related search
        """ """
        urls = []
        if 'items' in results:
            for item in results['items']:
                urls.append(url_normalize(item['link']))
        """
self
url
k