(self, body, root_url)
return filtered_urls
gathers links to be visited in the future from a web page's body.
        does it by finding "href" attributes in the DOM
        :param body: the HTML body to extract links from
        :param root_url: the root URL of the given body
        :return: list of extracted links
gathers links to be visited in the future from a web page's body.
        does it by finding "href" attributes in the DOM
        :param body: the HTML body to extract links from
        :param root_url: the root URL of the given body
        :return: list of extracted links
gathers links to be visited in the future from a web page s body . does it by finding href attributes in the DOM : param body : the HTML body to extract links from : param root_url : the root URL of the given body : return : list of extracted links
def _extract_urls(self, body, root_url):
        """
        gathers links to be visited in the future from a web page's body.
        does it by finding "href" attributes in the DOM
        :param body: the HTML body to extract links from
        :param root_url: the root URL of the given body
        :return: list of extracted links
        """
        pattern = r"href=[\"'](?!#)(.*?)[\"'].*?"  # ignore links starting with #, no point in re-visiting the same page
        urls = re.findall(pattern, str(body))

        normalize_urls = [self._normalize_link(url, root_url) for url in urls]
        filtered_urls = list(filter(self._should_accept_url, normalize_urls))

        return filtered_urls
def _extract_urls ( self , body , root_url ) : pattern = r"href=[\"'](?!#)(.*?)[\"'].*?" # ignore links starting with #, no point in re-visiting the same page urls = re . findall ( pattern , str ( body ) ) normalize_urls = [ self . _normalize_link ( url , root_url ) for url in urls ] filtered_urls = list ( filter ( self . _should_accept_url , normalize_urls ) ) return filtered_urls