search_apis/search_apis.py
def search_forward(self, urls, insite=False):
        """
        Fetch the pages and extract external links
        Args
            - urls: list of urls
            - insite: False if extracting links outside the host.
        """
        sites = self.fetcher.fetch_sites(urls, allow_fetch_later = True) 
        outlinks = set()
        for site in sites:
            for page in site:
                if insite:
                    links = self.link_extractor.extract_insite_links(page.get_url(), page.get_html())
                else:
                    links = self.link_extractor.extract_external_links(page.get_url(), page.get_html())
                links = self.select_subset(links)
                outlinks.update(links)

        print "Forward Search ", " - Number of results: ", len(outlinks)
        return list(outlinks)

        Fetch the pages and extract external links
        Args
            - urls: list of urls
            - insite: False if extracting links outside the host.
        
Fetch the pages and extract external links
Args
urls: list of urls
insite: False if extracting links outside the host.
Fetch the pages and extract external links Args urls : list of urls insite : False if extracting links outside the host .
def search_forward(self, urls, insite=False):
        sites = self.fetcher.fetch_sites(urls, allow_fetch_later = True) 
        outlinks = set()
        for site in sites:
            for page in site:
                if insite:
                    links = self.link_extractor.extract_insite_links(page.get_url(), page.get_html())
                else:
                    links = self.link_extractor.extract_external_links(page.get_url(), page.get_html())
                links = self.select_subset(links)
                outlinks.update(links)
        print "Forward Search ", " - Number of results: ", len(outlinks)
        return list(outlinks)
def search_forward ( self , urls , insite = False ) : sites = self . fetcher . fetch_sites ( urls , allow_fetch_later = True ) outlinks = set ( ) for site in sites : for page in site : if insite : links = self . link_extractor . extract_insite_links ( page . get_url ( ) , page . get_html ( ) ) else : links = self . link_extractor . extract_external_links ( page . get_url ( ) , page . get_html ( ) ) links = self . select_subset ( links ) outlinks . update ( links ) print "Forward Search " , " - Number of results: " , len ( outlinks ) return list ( outlinks )
Fetch the pages and extract external links
Args
 urls: list of urls
 insite: False if extracting links outside the host.
Fetch the pages and extract external links Args urls : list of urls insite : False if extracting links outside the host .
"""
        Fetch the pages and extract external links
        Args
            - urls: list of urls
            - insite: False if extracting links outside the host.
        """
self
urls
insite