def parse_section_links(self, section_title):
        """ Parse all links within a section

            Args:
                section_title (str): Name of the section to pull
            Returns:
                list: List of (title, url) tuples
            Note:
                Returns **None** if section title is not found
            Note:
                Side effect is to also pull the html which can be slow
            Note:
                This is a parsing operation and not part of the standard API"""
        soup = BeautifulSoup(self.html, "html.parser")
        headlines = soup.find_all("span", {"class": "mw-headline"})
        tmp_soup = BeautifulSoup(section_title, "html.parser")
        tmp_sec_title = tmp_soup.get_text().lower()
        id_tag = None
        for headline in headlines:
            tmp_id = headline.text
            if tmp_id.lower() == tmp_sec_title:
                id_tag = headline.get("id")
                break

        if id_tag is not None:
            return self._parse_section_links(id_tag)
        return None
def parse_section_links ( self , section_title ) : soup = BeautifulSoup ( self . html , "html.parser" ) headlines = soup . find_all ( "span" , { "class" : "mw-headline" } ) tmp_soup = BeautifulSoup ( section_title , "html.parser" ) tmp_sec_title = tmp_soup . get_text ( ) . lower ( ) id_tag = None for headline in headlines : tmp_id = headline . text if tmp_id . lower ( ) == tmp_sec_title : id_tag = headline . get ( "id" ) break if id_tag is not None : return self . _parse_section_links ( id_tag ) return None
Parse all links within a section

            Args:
                section_title (str): Name of the section to pull
            Returns:
                list: List of (title, url) tuples
            Note:
                Returns **None** if section title is not found
            Note:
                Side effect is to also pull the html which can be slow
            Note:
                This is a parsing operation and not part of the standard API