def _populate(self, soup):
        """
        Populate the list, assuming ``soup`` is a ``BeautifulSoup`` object.
        """
        tables = soup.select('table[rules=all]')
        if not tables:
            return
        trs = tables[0].select('tr')[1:]

        if len(trs[0]) == 5:
            # M1
            self._populate_small_table(trs)
        else:
            # M2
            self._populate_large_table(trs)
def _populate ( self , soup ) : tables = soup . select ( 'table[rules=all]' ) if not tables : return trs = tables [ 0 ] . select ( 'tr' ) [ 1 : ] if len ( trs [ 0 ] ) == 5 : self . _populate_small_table ( trs ) else : self . _populate_large_table ( trs )
Populate the list, assuming ``soup`` is a ``BeautifulSoup`` object.