search_apis/search_apis.py
def search_backward_forward_batch(self, sites):
        """
        Search related pages using backlink search and forward search

        Parameters:
            - sites: list of Website objects
        Returns:
            - list of urls (potentially duplicated)
        """
        t = time.time()
        backlinks = set()
        for site in sites:
            backlinks.update(self.search_backward(site.get_host()))
        backlinks = list(backlinks)
        print "Backlink search time: ", time.time() - t

        t = time.time()
        fwlinks =  self.search_forward(backlinks)
        print "Forward search time: ", time.time() - t
        return backlinks + fwlinks

        Search related pages using backlink search and forward search

        Parameters:
            - sites: list of Website objects
        Returns:
            - list of urls (potentially duplicated)
        
Search related pages using backlink search and forward search
Search related pages using backlink search and forward search
def search_backward_forward_batch(self, sites):
        t = time.time()
        backlinks = set()
        for site in sites:
            backlinks.update(self.search_backward(site.get_host()))
        backlinks = list(backlinks)
        print "Backlink search time: ", time.time() - t
        t = time.time()
        fwlinks =  self.search_forward(backlinks)
        print "Forward search time: ", time.time() - t
        return backlinks + fwlinks
def search_backward_forward_batch ( self , sites ) : t = time . time ( ) backlinks = set ( ) for site in sites : backlinks . update ( self . search_backward ( site . get_host ( ) ) ) backlinks = list ( backlinks ) print "Backlink search time: " , time . time ( ) - t t = time . time ( ) fwlinks = self . search_forward ( backlinks ) print "Forward search time: " , time . time ( ) - t return backlinks + fwlinks
Search related pages using backlink search and forward search
Search related pages using backlink search and forward search
"""
        Search related pages using backlink search and forward search

        Parameters:
            - sites: list of Website objects
        Returns:
            - list of urls (potentially duplicated)
        """
list of urls (potentially duplicated)
list of urls ( potentially duplicated )
self
sites
- sites
list of Website objects
list of Website objects