self.max_depth = max_depth if max_depth is not None else 2
        self.timeout = timeout if timeout is not None else 10
        self.prevent_outside = prevent_outside if prevent_outside is not None else True
    def _get_sub_links(self, raw_html: str, base_url: str) -> List[str]:
        """This function extracts all the links from the raw html,
        and convert them into absolute paths.
        Args:
            raw_html (str): original html
            base_url (str): the base url of the html
        Returns:
            List[str]: sub links
        """
        # Get all links that are relative to the root of the website
        all_links = re.findall(r"href=[\"\'](.*?)[\"\']", raw_html)
        absolute_paths = []
        invalid_prefixes = ("javascript:", "mailto:", "#")
        invalid_suffixes = (
            ".css",
            ".js",
            ".ico",
            ".png",
            ".jpg",
            ".jpeg",
            ".gif",
            ".svg",
        )
        # Process the links
        for link in all_links:
            # Ignore blacklisted patterns
            # like javascript: or mailto:, files of svg, ico, css, js
            if link.startswith(invalid_prefixes) or link.endswith(invalid_suffixes):
                continue
            # Some may be absolute links like https://to/path
            if link.startswith("http"):
                if (not self.prevent_outside) or (
                    self.prevent_outside and link.startswith(base_url)
                ):
                    absolute_paths.append(link)
            else:
                absolute_paths.append(urljoin(base_url, link))
            # Some may be relative links like /to/path
            if link.startswith("/") and not link.startswith("//"):