'Function to scrape the
contents of a table'

def get_table_contents(self, table):

    if (table is None):
        return ''
    tbody = table.find('tbody')
    text = ''
    if (tbody is None):
        return ''
    trs = tbody.find_all('tr')
    for tr in trs:
        td = tr.find('td')
        th = tr.find('th')
        text += (('\\n\\n<span    class="prog__sub">' + th.text) + '</span>')
        strong = td.find('strong', recursive=False)
        if (strong is not None):
            text += (('<p><strong>' + strong.text) + '</strong></p>')
        p = td.find_all('p')
        if (p != []):
            for e in p:
                text += (('<p>' + e.text) + '</p>')
        ul = td.find('ul')
        text += self.get_ul_contents(ul)
    return text
